[red.red-pc] ➤ ssh-keygen
WARNING:
You should not store anything in MobaXterm HOME directoy (/home/mobaxterm): with your current settings, this folder is not "persistent", so it will be cleared at each MobaXterm restart.
If you want to set a "persistent" HOME directory which will not be cleared at each MobaXterm startup, go to MobaXterm settings window and choose a folder in which to store MobaXterm home files.
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mobaxterm/.ssh/id_rsa):
/home/mobaxterm/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/mobaxterm/.ssh/id_rsa.
Your public key has been saved in /home/mobaxterm/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:InGPnZ7IvfhE/ejPBFOOsdoWGGVitbmKm7T/4M2RsD8 red@red-pc
2. copy the public key to remote host
[red.red-pc] ➤ ssh-copy-id -i id_rsa.pub 10.123.105.119
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
red@10.123.105.119's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '10.123.105.119'"
and check to make sure that only the key(s) you wanted were added.
3. login to remote host whitout password
[red.red-pc] ➤ ssh root@10.123.105.119
Last login: Thu Jul 12 16:26:06 2018 from 10.123.105.101