在~/.ssh目录下找到config文件( 没有就创建),添加如下内容:
Host hostname IdentityFile ~/.ssh/id_dsa
参考资料:
http://www.cyberciti.biz/faq/force-ssh-client-to-use-given-private-key-identity-file/
本文介绍如何通过修改~/.ssh/config文件来指定SSH客户端使用的私钥。通过设置Hosthostname并指定IdentityFile为~/.ssh/id_dsa,可以实现特定主机连接时自动使用对应的密钥。
在~/.ssh目录下找到config文件( 没有就创建),添加如下内容:
Host hostname IdentityFile ~/.ssh/id_dsa
参考资料:
http://www.cyberciti.biz/faq/force-ssh-client-to-use-given-private-key-identity-file/
921

被折叠的 条评论
为什么被折叠?