starlits@host1:~/.ssh$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/starlits/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/starlits/.ssh/id_rsa. Your public key has been saved in /home/starlits/.ssh/id_rsa.pub. The key fingerprint is: 57:d0:5c:a5:3a:d7:18:90:11:57:62:f4:0a:69:d8:2d starlits@twasadmin
starlits@twasadmin:~/.ssh$ ls authorized_keys id_rsa id_rsa.pub known_hosts
$ cat id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAlAEudFqJh7JtdOW6Cv713kL1k0zyaOyzPeHPj4eQ7wjOj/ero5k4DCcmacm/CPvtLrPDsKxMQUdyQQ4cOnMNRYVNX2pZL/NuREhrhbdUsGEwP9T49lpw4KLmPNxTnRFaiH17VA7M0Q0UP3a82ic74svbmZgRrmGPW1teh+aF3VYgYCBI1nsK2jWava6ULXH7GBmrXBCFHBtWDJH2xxe6Xev94ssDeUcdVaNNQKwGjXYwMiFNHktJM2g38KpkZYt02snx4AI6l91rsxOpmH6f76kWGn8eI1fYH8p21edMZDJMkITj6Opb8KAXJgQso14GhdRYJGMRkvTO6dLqKKL0UQ== starlits@host1
starlits@host1:~/.ssh$ scp id_rsa.pub host2:.ssh/
starlits@host2:~/.ssh$ ls id_rsa.pub known_hosts starlits@host2:~/.ssh$ mv id_rsa.pub authorized_keys starlits@host2:~/.ssh$ ls authorized_keys known_hosts
starlits@host1:~/.ssh$ ssh host2 PATH=/bin hostname host2