I tested on this my local servers
os = both are installed with Centos 5.2`
client ip address = 192.168.1.89
server ip address = 192.168.1.88
steps:
1.First create keygen
2. copy it to the remote server ./ssh/ directory
3. edit the file /etc/ssh/sshd_config and change the value """ StrictModes no ""
4. restart the sshd service ...
thats it ..
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[root@site14 ~]# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
ae:91:cd:e9:14:56:3f:a5:01:92:a6:c3:d1:62:34:8b root@site14.local
[root@site14 ~]# ssh-copy-id -i ~/.ssh/id_dsa.pub root@192.168.1.88
21
The authenticity of host '192.168.1.88 (192.168.1.88)' can't be established.
RSA key fingerprint is 41:b0:b1:77:f3:78:0d:94:f3:83:9b:09:cc:ed:53:89.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.88' (RSA) to the list of known hosts.
root@192.168.1.88's password:
Now try logging into the machine, with "ssh 'root@192.168.1.88'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[root@site14 ~]# vi /etc/ssh/
moduli sshd_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub
ssh_config ssh_host_dsa_key ssh_host_key ssh_host_rsa_key
[root@site14 ~]# vi /etc/ssh/ssh_
ssh_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub
ssh_host_dsa_key ssh_host_key ssh_host_rsa_key
[root@site14 ~]# vi /etc/ssh/sshd_config
[root@site14 ~]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[root@site14 ~]# ssh root@192.168.1.88
Last login: Tue May 29 02:18:49 2012 from ldap.testvm.local
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
logged successfully without asing password
os = both are installed with Centos 5.2`
client ip address = 192.168.1.89
server ip address = 192.168.1.88
steps:
1.First create keygen
2. copy it to the remote server ./ssh/ directory
3. edit the file /etc/ssh/sshd_config and change the value """ StrictModes no ""
4. restart the sshd service ...
thats it ..
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[root@site14 ~]# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
ae:91:cd:e9:14:56:3f:a5:01:92:a6:c3:d1:62:34:8b root@site14.local
[root@site14 ~]# ssh-copy-id -i ~/.ssh/id_dsa.pub root@192.168.1.88
21
The authenticity of host '192.168.1.88 (192.168.1.88)' can't be established.
RSA key fingerprint is 41:b0:b1:77:f3:78:0d:94:f3:83:9b:09:cc:ed:53:89.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.88' (RSA) to the list of known hosts.
root@192.168.1.88's password:
Now try logging into the machine, with "ssh 'root@192.168.1.88'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[root@site14 ~]# vi /etc/ssh/
moduli sshd_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub
ssh_config ssh_host_dsa_key ssh_host_key ssh_host_rsa_key
[root@site14 ~]# vi /etc/ssh/ssh_
ssh_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub
ssh_host_dsa_key ssh_host_key ssh_host_rsa_key
[root@site14 ~]# vi /etc/ssh/sshd_config
[root@site14 ~]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[root@site14 ~]# ssh root@192.168.1.88
Last login: Tue May 29 02:18:49 2012 from ldap.testvm.local
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
logged successfully without asing password
No comments:
Post a Comment