ssh 免密码登录

ssh-keygen -t rsa

公钥复制进authorized_keys文件里:

cat id_rsa.pub >> ~/.ssh/authorized_keys

私钥文件id_rsa复制到windows上,用puttygen.exe生成对应的ppk文件,然后在putty configuration->category->connection->SSH->Auth->private key file for authentication里指定这个ppk文件,然后登录时只需要输入用户名就能登录过去

打赏