# cd ~/.ssh
# ssh-keygen -t rsa -f id_rsa
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
xx:xx:xx:08:d1:d1:29:da:29:8b:
Log in as the intended user on the target machine. Add the public key
(id_rsa.pub) to ~/.ssh/authorized_keys. The file should look something
like this.
ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAIEAtf
A72dzJB8UcLCMB0jyEhNz3yN/
root@system
Note that this is all on one line. If you accidentally split it over
multiple lines, you'll get something like this:
# scp file user@system:/tmp
Connection closed by 10.10.16.10
lost connection
On system, you'll see something like the error below in /var/adm/messages
Jul 7 11:48:18 system sshd[26022]: [ID 800047 auth.crit] fatal:
buffer_get: trying to get more bytes 129 than in buffer 34
没有评论:
发表评论