key-pair

Recovering lost AWS EC2 Key Pairs

℡╲_俬逩灬. 提交于 2021-02-08 12:07:01
问题 AWS rookie here. I created a few EC2 instances under my AWS account and reused the same Key Pair for all of them. I believe (IIRC) that I had generated the Key Pair from inside AWS, but that could be wrong. Over this past weekend I sold my old laptop (after completely wiping the hard disk) and got a new one. I'm just remembering now ( :facepalm ) that I forgot to copy all my SSH private keys to a flash drive and that I no longer have them. All I want/need to do is to SSH into my EC2 instances

Recovering lost AWS EC2 Key Pairs

和自甴很熟 提交于 2021-02-08 12:03:10
问题 AWS rookie here. I created a few EC2 instances under my AWS account and reused the same Key Pair for all of them. I believe (IIRC) that I had generated the Key Pair from inside AWS, but that could be wrong. Over this past weekend I sold my old laptop (after completely wiping the hard disk) and got a new one. I'm just remembering now ( :facepalm ) that I forgot to copy all my SSH private keys to a flash drive and that I no longer have them. All I want/need to do is to SSH into my EC2 instances

crypto/ssh ParsePublicKey “short read” error

ⅰ亾dé卋堺 提交于 2021-02-07 20:17:59
问题 In a program I am developing I need a way to add public keys into the authorized_keys file during development, so I am using command line arguments to do so. I have omitted most of the code, but if you would like to view all of the code, here is the repository, with the problem line being located in main.go on line 20. b, err := ioutil.ReadFile(os.Args[1]) if err != nil { log.Fatalf("Fatal error trying to read new public key file: %s", err) } newAuthorizedKey, err := ssh.ParsePublicKey(b) if

Android KeyGenParameterSpec.Builder ignoring setCertificateNotBefore and setCertificateNotAfter when not in Secure Hadware

ε祈祈猫儿з 提交于 2020-06-01 05:02:41
问题 I've created the following method that creates a KeyPair and logs the Certificate details: @RequiresApi(api = Build.VERSION_CODES.N) public void createRSAKeyPairtWithChallenge(final String alias, final String attestationChallenge) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyStoreException, CertificateException, IOException { Calendar start = Calendar.getInstance(); Calendar end = new GregorianCalendar(2025,03,24); KeyPairGenerator

Convert .pem key file to .ppk in Windows automatically/script/command line

ぃ、小莉子 提交于 2020-02-28 08:42:22
问题 I'm using Vagrant to create VMs on a Windows host, to which I would like to connect with PuTTY. Vagrant creates an RSA private key in the .pem format. PuTTY needs a key in the .ppk format to create a connection. I would like to convert the .pem to .ppk automatically when creating the vagrant VM. The question of how to convert .pem to .ppk has been asked and answered lots of times, but on Windows all those answers involve clicking through the puttygen GUI. It seems that on Linux, puttygen can

Working With Dynamic Multidimensional key-value pairs in JSON

依然范特西╮ 提交于 2020-01-07 03:23:10
问题 Having a thorny problem and only see similar but also simpler solutions on SO. Is is possible to generate a dynamic key AND dynamic values using JS/JSON? For instance, let's say I have JSON like this: { "email": "user@someco.com", "firstname": "Bob", "lastname": "Smith", "company": "ACME", "custom": { "services": [ { "name": "svc1", "desc": "abcdefg", "selected": "true", "status": "None" }, { "name": "svc2", "desc": "abcdefg", "selected": "true", "status": "None" }, { "name": "svc3", "desc":

Parse RSA key pair from string in Python

我是研究僧i 提交于 2020-01-06 04:24:44
问题 I'm trying to generate/read a RSA-keypair from the publicKey and the privateKey as a String. Something like this: priK = "-----BEGIN RSA PRIVATE KEY-----MIIBOQIBAAJAVJhUS0gLqXLOmVv2xG23oFPwim9+rVxGhLUXqKShQCvB3iRMOHn7/GNJumpwmnglcsNXuqAhN0OxqKGGJdtYdwIDAQABAkBP0VrXnSbDvvuIX+k59Xvo3sp7FDAmSoaO+H9WM9+ht5H/f/geIrSEXSIkFLnzniMwtOJ422GmkDkL1F67HuDhAiEAlNauDiq3RqoXufbauyPEOG9fMS2pvB+auT2XCHJhhKsCIQCRgIo7WIRZYnNpNRWaoppUQK3g+aM8sdeBYpbs2nwDZQIgZXIxrmxFAUAb7d+oVFdbfc

AWS - Create new instance from AMI, but lost keys?

落爺英雄遲暮 提交于 2020-01-05 08:56:08
问题 I have an AMI that I created a few weeks ago. I want to launch a new AWS EC2 instance and provide that AMI as the image. Problem is, I can't ssh into that box now. I have tried to attach a new key pair when launching the new instance, but it's as if the configuration of the SSH keys on the box is ignoring my newly attached key pair. Is there a way to overcome this issue? I know my new key pair works, I've tested it on a totally blank new instance and I can SSH in just fine. Any help is

How do I do encryption/decryption without generating keypairs again?

╄→гoц情女王★ 提交于 2020-01-04 05:14:22
问题 I have been working on a project myself and using this website's codes as a guide. Is there any way, I can put the generation of keys into 1 file and encryption/decryption into another. How do I define bob_box without having to generate another pair of keys? GEN.PY: import libnacl.public def genkeys(): bob = libnacl.public.SecretKey() alice = libnacl.public.SecretKey() bob_box = libnacl.public.Box(bob.sk, alice.pk) alice_box = libnacl.public.Box(alice.sk, bob.pk) genkeys() ENDEcrypt: import

“Server Refused our key” after launching instance from private EBS AMI

爱⌒轻易说出口 提交于 2019-12-30 02:51:14
问题 I have created my own EBS AMI, shared it with another AWS account, launched NEW instance based on this image with NEW key-pair and now when I am trying to connect to this new instance I am getting error: "Server Refused our key". This is what I did (step by step): Configured new CentOS 6.3 server in my personal account (with my personal key-pair) Created EBS AMI image of that server Shared this image with my client's account Launched new instance in my clients account based on this shared