当前位置:网站首页>SSH configuration password free login error: /usr/bin/ssh copy ID: error: no identities found solution

SSH configuration password free login error: /usr/bin/ssh copy ID: error: no identities found solution

2022-07-01 02:37:00 Xiao Yueyue who speaks C language

One 、ssh Password free login :

1. Create key :

ssh-keygen

Then just go straight back .
After execution ,~/.ssh/ There will be two more files in the directory :
id_rsa: Private key
id_rsa.pub: Public key

2. Add a public key to the server :

Which server do you want to log in without password , Just pass the public key to which server .

Mode one :
for example , Want to log in without secret myserver The server . The contents of the public key , Copied to the myserver Medium ~/.ssh/authorized_keys Just in the file .

Mode two :
You can also use the following command to add a public key with one click :

ssh-copy-id myserver

Two 、 Be careful :

When you use mode 2 ssh-copy-id myserver When the command adds a public key to the server , If the following error occurs ,

/usr/bin/ssh-copy-id: ERROR: No identities found

Check your ssh-copy-id Whether the command is executed under the permission of the local host account , Or log in to the server account to execute , It should be executed under the local host , If you log in to the server account, an error will be reported .

原网站

版权声明
本文为[Xiao Yueyue who speaks C language]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207010233444020.html