FYI, when I have followed the instructions for setting up ssh
passwordless login using ssh-kgen given at the link below, it has always
gone well for me:
https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/
First, you might want to check if you have the following files and file
permissions similar to:
***@computername:~$ ls -al ~/.ssh
total 24
drwx------Â 2 username username 4096 Oct 28 23:54 .
drwxr-xr-x 68 username username 4096 Oct 28 23:54 ..
-rw-rw-r-- 1 username username 401 Oct 28 23:54 authorized_keys
-rw-------Â 1 username username 1679 Oct 28 23:50 id_rsa
-rw-r--r-- 1 username username 401 Oct 28 23:50 id_rsa.pub
-rw-r--r-- 1 username username 222 Oct 28 23:47 known_hosts
Second, you might try removing all the files in .ssh to start over:
***@computername:~$ rm ~/.ssh/*
After removing all the files in the .ssh folder, it prompts me again for
my password:
***@computername:~$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is blah blah.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
***@localhost's password:
...
Last login: Sun Oct 28 23:39:38 2018 from 127.0.0.1
***@computername:~$ exit
...
Next, I setup the ssh-keygen on the client hostname (e.g. localhost),
then I copy authorized_keys to the remote hostname (e.g., localhost <-
Usually, this has to be done using the hostname for each of your nodes.Â
In this case, it only has to be done once and it connects back to the
same localhost.):
***@computername:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id_rsa.
Your public key has been saved in /home/username/.ssh/id_rsa.pub.
The key fingerprint is:
blah blah ***@computername
The key's randomart image is:
+---[RSA 2048]----+
|     o o      |
|Â Â Â Â Â Â ()Â Â Â Â Â Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
+----[SHA256]-----+
***@computername:~$ cat ~/.ssh/id_rsa.pub | ssh localhost 'cat >>
~/.ssh/authorized_keys'
***@localhost's password:
***@computername:~$ exit
logout
Connection to localhost closed.
It works as it no longer prompts for a password (i.e., it no longer
stops with "***@localhost's password:" when connecting):
***@computername:~$ ssh localhost
...
Last login: Sun Oct 28 23:49:28 2018 from 127.0.0.1
***@computername:~$exit
Finally, "ls -al ~/.ssh" gives the files and file permissions that were
first shown above.
Remove the config file.
Your username seems to be:Â User
You don't want a    user localhost
localhost is the hostname, not the username.
-------- Weitergeleitete Nachricht --------
Betreff:Â Â Â Â [RE]Re: [Wien] Fail to parallel calculation of lapw1 and
lapw2 (testpara1 and testpara2)
Datum:Â Â Â Â Mon, 29 Oct 2018 00:48:47 +0900 (KST)
Dear Peter Blaha,
I set 'User localhost' in config file.
Sorry, IÂ mistyped authorized_keys as key_authorized in mailing.
Anyway I retried
1. ssh-keygen ât rsa
2 .append .ssh/authorized_keys on remote host with id_rsa.pub of local
host
In 'Installation of Wien2k, parallelization, large scale applications
with WIEN2k' your presentation file.
But it still requires password.
-----------------------------------
------------------------------------
Are there any more steps that I need to perform?
Sincerely,
Woohyeon Baek