其他分享
首页 > 其他分享> > ssh连接远程服务器设置无密码登录

ssh连接远程服务器设置无密码登录

作者:互联网

1.保证有git,git生成的公钥和私钥
2.使用ssh-copy-id命令将公钥上传到你的服务器:ssh-copy-id username@remote-server
3.在你的~/.ssh目录下添加config文件,我设置的快捷昵称为susu,您可以酌情替换,内容如下:
HOST susu
HostName 服务器ip
Port 22
User root
IdentityFile ~/.ssh/id_rsa
4.使用ssh susu登录你的服务器,第一次需要输入密码,后边就不用输入了,愉快的开始吧~

标签:git,登录,susu,ssh,服务器,copy,id
来源: https://www.cnblogs.com/holaJava/p/14015232.html