如何添加SSH密钥? [英] How can I add SSH key?
本文介绍了如何添加SSH密钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将远程服务器的Linux SSH密钥添加到本地Linux机箱。 SSH服务器的IP地址是192.168.2.3
我尝试了什么:
How can I add Linux SSH keys of the remote server to my local Linux box. The SSH server IP address is 192.168.2.3
What I have tried:
How can I add Linux SSH keys of the remote server to my local Linux box. The SSH server IP address is 192.168.2.3
推荐答案
您应该可以使用ssh-copy-id user @ host
这会将您的ssh-key从当前系统复制到 host 。如果您的.ssh
文件夹中有多个密钥,或通过ssh-add添加,您可以使用选择要复制的密钥-i
选项。 E,Bssh-copy-id~ / .ssh / id_ecdsa user @ host
如果您没有ssh-copy-id,则必须手动复制密钥
You should be able to usessh-copy-id user@host
That will copy your ssh-key from the current system to host. If you have more than one key in your.ssh
folder, or added via ssh-add, you can select the key you wish to copy using the-i
option. e.b.ssh-copy-id ~/.ssh/id_ecdsa user@host
If you don't have ssh-copy-id, you'll have to copy the key manually
localhost
>
scp~ / .ssh / id_ecdsa.pub user @ remote:
localhost
scp ~/.ssh/id_ecdsa.pub user@remote: localhost
ssh user @ remote
user @ remote的密码:
remotehost
ssh user@remote user@remote‘s password: remotehost
这篇关于如何添加SSH密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文