Questions tagged [ssh-keygen]
76 questions
400
votes
3 answers
How do I change my private key passphrase?
I have an existing public/private key pair. The private key is password protected, and the encryption may be either RSA or DSA. These keys are the kind you generate with ssh-keygen and generally store under ~/.ssh.
I'd like to change the private…
kch
- 4,472
- 3
- 19
- 17
120
votes
4 answers
What significance does the user/host at the end of an SSH public key file hold?
I can’t figure out why does an SSH public key file generated by ssh-keygen have a user and host at the end of it.
Example: id_rsa.pub
ssh-rsa ... rest of file ... /CA9gyE8HRhNMG6ZDwyhPBbDfX root@mydomain
Notice the root@mydomain at the end of the…
Basil A
- 1,910
- 2
- 17
- 18
86
votes
6 answers
How to get a .pem file from ssh key pair?
I created a key pair using ssh-keygen and get the two clasic id_rsa and id_rsa.pub.
I imported the public key into my AWS EC2 account.
Now I created a windows instance and to decrypt that instance password, AWS console is asking me for a .pem file.…
user120858
60
votes
4 answers
Straight forward way to run ssh-agent and ssh-add on login via SSH?
I'm trying to have the following commands be auto-executed when I login to my server via ssh:
ssh-agent /bin/bash
ssh-add ~/.ssh/id_rsa
My ssh key has a passphrase and I'm fine with entering it once per login.
I tried putting this in my .bashrc…
Click Upvote
- 795
- 2
- 7
- 12
49
votes
7 answers
How to get all fingerprints for .ssh/authorized_keys(2) file
Is there a simple way to get a list of all fingerprints entered in the .ssh/authorized_keys || .ssh/authorized_keys2 file?
ssh-keygen -l -f .ssh/authorized_keys
will only return fingerprint of first line / entry / publickey
hack with awk:
awk…
childno͡.de
- 631
- 1
- 5
- 14
32
votes
4 answers
How do I know if *.pem is password protected using ssh-keygen?
I have got a file myfile-privkey.pem.
How do I check if the private key file is password protected using ssh-keygen?
Wojtek
- 455
- 1
- 4
- 6
17
votes
4 answers
Turn off strict checking of ssh keys
Each user creates and destroys 15+ VM's per day. The VM's are created in the company's internal OpenStack cloud.
Every time a new vm is assigned an ip address which has previously been handed out, the user gets the dreaded host key verification…
spuder
- 1,695
- 2
- 25
- 42
9
votes
3 answers
RSA or DSA: What's the definitive answer when generating SSH key pairs?
Possible Duplicate:
SSH keypair generation: RSA or DSA?
Some say use RSA, some say use DSA, some say it doesn't matter.
Some say one is more secure than the other, some say the reverse.
Some say it's a patent issue.
So, what's the real story…
kch
- 4,472
- 3
- 19
- 17
9
votes
2 answers
SSH keys: why is id_rsa larger than id_rsa.pub?
My private key (~/.ssh/id_rsa) is a 1766-byte file, but my public key (~/.ssh/id_rsa.pub) is only 396 bytes in length. Why the massive difference? Is it because the private key is encrypted using AES? Isn't AES ciphertext usually around the same…
splicer
- 193
- 1
- 4
8
votes
2 answers
Getting SHA1 Digest of SSH Public Key
It seems like this should be easy. I run "ssh-keygen -l -f " (the default seems to be SHA1). All of the examples show it printing the hex-formatted digest with a little extra, harmless information. Yet, on my Mac I'm getting a useless, opaque…
Dustin Oprea
- 510
- 1
- 7
- 19
7
votes
1 answer
Verify that an SSH command has not been embedded in a certificate?
From man 8 sshd with regards to the Authorized Keys File Format and the command="command" option:
Note that this command may be superseded by either an sshd_config(5) ForceCommand directive or a command embedded in a certificate.
Using ssh-keygen…
Monica For CEO
- 320
- 1
- 17
7
votes
1 answer
Choosing the encryption algorithm used by OSX ssh-keygen
I have several users that use SmartCVS on OSX to interact with our CVS repository. We use the cvs :ext: (SSH2) method to access the repository, which is stored on a remote linux system. We use ssh key authentication, and require that users encrypt…
EEAA
- 108,414
- 18
- 172
- 242
7
votes
2 answers
Ubuntu 20.04 ssh-keygen unknown option -G unable to generate Diffie-Hellman parameters
I have noticed that the ssh-keygen for ubuntu 20.04 is missing the options for generating the Diffie-Hellman parameters. This is normally part of SSH hardening. Does anyone know why it has disappeared?
Rob
- 131
- 3
6
votes
2 answers
How to verify the private key I have matches AWS keypair?
My AWS instance says it is configured to use the only keypair I have on my account and it has a fingerprint in the format of:
3c:64:a7:85:53:3f:81:1c:24:5a:d2:6a:5b:76:47:da:f3:14:63:88
I have a key.pem file on my computer. How do I verify that…
csharpapple
- 203
- 3
- 6
6
votes
3 answers
ssh login successful, but scp password gives me "Permission denied"
I'm trying to get some blogging software up on an organizational remote server. I tried to set up a SSH Key but was having problems and decided that getting the blog up and running was more important than dealing with the SSH Key issue, so I…
YANewb
- 61
- 1
- 1
- 4