1834127 Members
2348 Online
110064 Solutions
New Discussion

Passwordless SSH problem

 

Passwordless SSH problem

I looked through previous posts and tried using the information to get ours working. I am still having problems. I have attached the debub information and sshd_config for the connecting system and the ssh_config information of the Windows remote system.

4 REPLIES 4
Logu_2
Advisor

Re: Passwordless SSH problem

I guess the client tries to connect to the server with protocol version 2. The options that you have given works only on protocol version 1. So try to connect to the server explicitly through protocol version 1 by adding -1 option to the commandline

ssh -1 -vvv ........

Make sure the server is started with protocol 1 support.

Note: ssh protocol version 1 is less secured than version 2.
Steven E. Protter
Exalted Contributor

Re: Passwordless SSH problem

Shalom Larry,

The most common issues with password free access are the owner of the home directory and .ssh directory and the permissions therein.

The directories and files must be owned by the user attempting to login.

Default permissions should be what you see below:

drwxr-x--- 15 root root 4096 Jun 11 04:42 /root/
drwx------ 2 root root 4096 May 10 08:04 /root/.ssh/
[root@gated .ssh]# ll
total 32
-rw-r--r-- 1 root root 3653 Jun 4 02:37 authorized_keys
-rw------- 1 root root 668 May 10 08:03 id_dsa
-rw-r--r-- 1 root root 614 May 10 08:03 id_dsa.pub
-rw-r--r-- 1 root root 1312 Jun 8 10:31 known_hosts

They may look a bit different under windows, but the permission requires are exactly the same.

ssh/scp/sftp with the -vvv command often brings issues to light.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Passwordless SSH problem

Thanks for your replies,

When I created the keygens on HP-UX and the Windows box I used

ssh-kengen -t rsa

This should have created a protocol 2 RSA. I do get the following debug message:

debug1: Enabling compatibility mode for protocol 2.0

I tried forcing protocol 2 and get the same debug messages in the connection attempt:

ssh -i job_tcon_rsa -v -2 dewey.nhctc.edu


As for the directory and files, on the HP-UX system I have the permissions set the way you suggested:

drwx------ 2 job_tcon users 2048 Jun 12 07:54 .ssh

-rw-r--r-- 1 job_tcon users 224 Jun 9 08:23 authorized_keys
-rw------- 1 job_tcon users 951 Jun 9 08:20 job_tcon_cannon_rsa
-rw-r--r-- 1 job_tcon users 225 Jun 9 08:20 job_tcon_cannon_rsa.pub
-rwxr--r-- 1 job_tcon users 475 Jun 9 09:45 known_hosts


I did read openSSH for Windows key_authorization.txt file that some Windows servers have problems reading the public key try setting StrictModes to 'no' in sshd_config. I did that, stop/restart OpenSSH and everything is working.

Regards,

Larry

Re: Passwordless SSH problem

Look at the previous reply