I generated an OpenSSH private key using puttygen (and exported it in OpenSSH format). How can I put a password on this existing key (I know how to generate a new key with a password)?
相关问题
- JavaScript File Transfer SSH
- Why does this bash script work at console but fail
- SSH Fingerprint not authorized on Heroku after git
- (Scp - Permission Denied (Public Key) [closed]
- How to generate an ssh key for logging into a serv
相关文章
- Check if directory exists on remote machine with s
- Git Clone Fails: Server Certificate Verification F
- Test if File/Dir exists over SSH/Sudo in Python/Ba
- Can't access AWS CodeCommit with SSH
- Sanity check SSH public key? [closed]
- Spark EC2 SSH connection error SSH return code 255
- Use RSA with Eclipse Remote Systems Explorer?
- Paramiko - Bad Authentication Type [Cisco SG-300 S
Try the command
ssh-keygen -p -f keyfile
From the ssh-keygen man page
Example:
You can also use
openssl
:see: https://security.stackexchange.com/a/59164/194668
Use the -p option to ssh-keygen. This allows you to change the password rather than generate a new key.
Change the password as sigjuice shows:
The required password will be the new password. (This assumes you have added the public key
~/.ssh/id_rsa.pub
to your authorized_keys files.) Test with ssh:You can have multiple keys with different names for different uses.