how to connect to wotan without a password
Introduction
This document explains how to set up access without password to wotan
from a machine that has a unix shell with commonly available ssh
utitities.
Let us assume we are coming from your Mac’s terminal session, or
some other VT100 or so terminal shell software. I will refer to that machine as
home_host here, and assume you are user home_user on
that machine. I also assume you are user wotan_user on wotan, and
you have the password wotan_password. I underline what you
enter and use ␍
as a special code for the
return character. I use ? to represent characters that
I can’t forecast. Note that any passwords you entered are not echoed.
Work on wotan
Let us first connect to wotan to make sure it works, and
create an ssh key pair once we are there.
home_user@
home:~$
ssh
wotan_user@dlib.info␍
wotan_user@dlib.info's password:
wotan_password␍
Linux wotan
linux_version
date_compiled architecture
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
wotan_user@wotan:~$
Now, you create a public and private key pair on wotan
with the ssh-keygen utility.
You give an empty passphrase and accept the default choices
wotan_user@wotan:~$
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/
wotan_user/.ssh/id_rsa):
Created directory '/home/
wotan_user/.ssh'.
Enter passphrase (empty for no passphrase):
␍
Enter same passphrase again:
␍
Your identification has been saved in /home/
wotan_user/.ssh/id_rsa.
Your public key has been saved in /home/
wotan_user/.ssh/id_rsa.pub.
The key fingerprint is:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??
The key's randomart image is:
+--[ RSA 2048]----+
|
???????????????????|
|
???????????????????|
|
???????????????????|
|
???????????????????|
|
???????????????????|
|
???????????????????|
|
???????????????????|
|
???????????????????|
|
???????????????????|
+-----------------+
wotan_user@
wotan
:~$
exit␍
Work an the local machine
With the last command you have left wotan. You are back
to the terminal session on home_host. There you
do the same thing. It may look a little bit different here
home_user@
home_host:~$
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/
home_user/.ssh/id_rsa):
Created directory '/home/
home_user/.ssh'.
Enter passphrase (empty for no passphrase):
␍
Enter same passphrase again:
␍
Your identification has been saved in /home/
home_user/.ssh/id_rsa.
Your public key has been saved in /home/
home_user/.ssh/id_rsa.pub.
The key fingerprint is:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??:
??
home_user@
home_host:~$
Next you authorize yourself to enter your account.
home_user@
home_host:~$
cd .ssh␍
home_user@
home_host:~/.ssh$
cp id_rsa.pub authorized_keys
␍
home_user@
home_host:~/.ssh$
cd
␍
home_user@
home_host:~$
You now copy the keys to wotan
home_user@
home_host:~/$
scp -r .ssh/autorized_keys
wotan_user@dlib.info:.ssh/.␍
The authenticity of host 'dlib.info (148.4.2.231)' can't be established.
RSA key fingerprint is c9:c0:44:36:63:2a:9a:6f:e0:1e:51:7f:00:3d:47:c5.
Are you sure you want to continue connecting (yes/no)?
y␍
Warning: Permanently added 'dlib.info,148.4.2.231' (RSA) to the list of known hosts.
Password:
wotan_password␍
.ssh/authorized_keys 100% 392 0.4KB/s 00:00
You should now be able to login from your account to
wotan_user@dlib.info
without giving a password
home_user@
home:~$
ssh
wotan_user@dlib.info␍
wotan_user@dlib.info's password:
wotan_password␍
Linux wotan
linux_version
date_compiled architecture
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
wotan_user@wotan:~$
Conclusion
Kindly let
Thomas Krichel know if you find
any error in this document, or have any suggestions to improve it.