📢 Actions Speak Louder Than Words!

Setup SSH login without password

Posted: Dec 10, 2020 | Reading time: 1 min
# Currently on Windows with MingGW64 terminal
$ uname -a
MINGW64_NT-10.0-18363 AYAM-ITEK-KAMBING 3.1.6-340.x86_64 2020-07-09 14:33 UTC x86_64 Msys

# we must make sure the permissions to files and folders are correct
$ chmod 600 ~/.ssh/authorized_keys 
$ chmod 700 ~/.ssh/

# copy the public key contents from LOCAL MACHINE to REMOTE MACHINE
$ ssh-copy-id -i ~/.ssh/id_rsa.pub robbi@ -p2222
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "~/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh -p '2222' 'robbi@'"
and check to make sure that only the key(s) you wanted were added.

# try to ssh into remote machine
$ ssh robbi@ -p 2222
Last login: Fri Dec 11 03:02:27 2020 from
[robbi@r0x ~]$ uname -a
Linux r0x 5.9.11-200.fc33.x86_64 #1 SMP Tue Nov 24 18:18:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[robbi@r0x ~]$ cat /etc/fedora-release
Fedora release 33 (Thirty Three)


Discussion and feedback

You can use utterances provided below to post comment on behalf using Github account. Alternatively, you can just send a (plain text) email to my private email or personal public mailing list. In a few cases and on certain time, I just don’t have time to moderate them. Please read terms-of-service (ToS) for details.