Local -> Remote (no passwd login)
1. Key generating
- Local server home directory $> ssh-keygen -t dsa <enter>
Show message
Generating public/private dsa key pair.
Enter file in which to save the key (/home/hadoop/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
<all enter>
The key fingerprint is:
34:23:12:e5:d3:53:323:34...................................... user_name@hostname
2. Brings Local server created key from remote server.
Remote server home directory $> scp user_name@hostname:~/.ssh/id_dsa.pub .ssh/authorized_keys
user_name@hostname server's password input and enter.
3. from remote server to Local server ssh login
ssh user_name@hostname <enter>
if no problem then no password login, success.
4. if failed then to do.
remote server directory privilege
1) if home directory name is "hadoop" then chmod 755 hadoop <enter>
2) .ssh directory privilege is 700
3) authorized_keys file privilege is 644
and
try sshd config change
vi /etc/ssh/sshd_config <enter>
- change list -
1> StrictModes no
2> RSAAuthentication yes
3> PubkeyAuthentication yes
4> AuthorizedKeysFile .ssh/authorized_keys
<save & exit>
/etc/init.d/sshd restart <enter>
try ssh login
1. Key generating
- Local server home directory $> ssh-keygen -t dsa <enter>
Show message
Generating public/private dsa key pair.
Enter file in which to save the key (/home/hadoop/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
<all enter>
The key fingerprint is:
34:23:12:e5:d3:53:323:34...................................... user_name@hostname
2. Brings Local server created key from remote server.
Remote server home directory $> scp user_name@hostname:~/.ssh/id_dsa.pub .ssh/authorized_keys
user_name@hostname server's password input and enter.
3. from remote server to Local server ssh login
ssh user_name@hostname <enter>
if no problem then no password login, success.
4. if failed then to do.
remote server directory privilege
1) if home directory name is "hadoop" then chmod 755 hadoop <enter>
2) .ssh directory privilege is 700
3) authorized_keys file privilege is 644
and
try sshd config change
vi /etc/ssh/sshd_config <enter>
- change list -
1> StrictModes no
2> RSAAuthentication yes
3> PubkeyAuthentication yes
4> AuthorizedKeysFile .ssh/authorized_keys
<save & exit>
/etc/init.d/sshd restart <enter>
try ssh login