LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-29-2010, 04:19 AM   #1
jindalarpan
Member
 
Registered: Mar 2006
Posts: 94

Rep: Reputation: 15
passwordless SSH issue


I am facing issue setting up password less login to to linux machines.

issue is like this, i am having 3 machines, A,B and C.

A windows machine
B linux server
C linux server


I have gerenreted a public and private key combination on A. with the help of puttygen. and added the public key to B in authorized_keys and able to do the password less login.
but issue is when i am doing the same for C i am not able to do password less login.
on C it asks for the password every time i try connect using putty.

Is there anything that need to be checked or changed for making itwork on C.


Thanks for inputs in advance.
 
Old 09-29-2010, 04:23 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well if you're trying to do exactly the same thing to the same boxes, then there has to be some form of inconsistency in what you have done. The most common gotcha is to have the wrong permissions on the ~/.ssh directory on the server, but clearly there are plenty of other places. Can you configure the login from server to server, rather than from the windows box? If you get that working, then that should push you in a more specific direction of investigation.
 
Old 09-29-2010, 04:35 AM   #3
theboogymaster
LQ Newbie
 
Registered: Jan 2010
Location: Switzerland
Distribution: Ubuntu
Posts: 7

Rep: Reputation: 0
Do you have a password for you key ?
 
Old 09-29-2010, 04:36 AM   #4
theboogymaster
LQ Newbie
 
Registered: Jan 2010
Location: Switzerland
Distribution: Ubuntu
Posts: 7

Rep: Reputation: 0
And try changing the PasswordAuthentification to NO in the /etc/ssh/sshd_config file
 
Old 09-29-2010, 05:47 AM   #5
jindalarpan
Member
 
Registered: Mar 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by theboogymaster View Post
Do you have a password for you key ?
no pass phrase or password for key
 
Old 09-29-2010, 05:55 AM   #6
jindalarpan
Member
 
Registered: Mar 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by theboogymaster View Post
And try changing the PasswordAuthentification to NO in the /etc/ssh/sshd_config file
after chanfing it to no it has stoped me from looging to server completelly. giving erroe message as

type 14 (no more serevr auth available):" Server does not supply any autherntication methods by firewal"
 
Old 09-29-2010, 06:03 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
OK, so the key auth is clearly failing. can we go back to seeing if the file permissions are right and if you can do it from the other server? You can also enable more verbose logging on the server side to see what it doesn't like abuot the authentication attempt in your /etc/ssh/sshd_config
 
Old 09-29-2010, 06:08 AM   #8
jindalarpan
Member
 
Registered: Mar 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
well if you're trying to do exactly the same thing to the same boxes, then there has to be some form of inconsistency in what you have done. The most common gotcha is to have the wrong permissions on the ~/.ssh directory on the server, but clearly there are plenty of other places. Can you configure the login from server to server, rather than from the windows box? If you get that working, then that should push you in a more specific direction of investigation.
i have setup password less ssh from B to C and its works.
 
Old 09-29-2010, 06:10 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
OK, so it must be something in the client config, unless you have a different ssh key on the server and have not entered the windows one correctly.
 
Old 09-29-2010, 06:19 AM   #10
jindalarpan
Member
 
Registered: Mar 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
OK, so it must be something in the client config, unless you have a different ssh key on the server and have not entered the windows one correctly.
double checked
i am using same key combinations for both the serviers B and C. Also checked the authorised_key entry on C.
 
Old 09-29-2010, 06:28 AM   #11
jindalarpan
Member
 
Registered: Mar 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jindalarpan View Post
double checked
i am using same key combinations for both the serviers B and C. Also checked the authorised_key entry on C.

I have found out some thign
that
the putty event log for server B is


2010-09-29 16:59:43 Looking up host "x.x.x.y"
2010-09-29 16:59:43 Connecting to x.x.x.y port 22
2010-09-29 16:59:43 Server version: SSH-2.0-OpenSSH_4.3
2010-09-29 16:59:43 We claim version: SSH-2.0-PuTTY_Release_0.60
2010-09-29 16:59:43 Using SSH protocol version 2
2010-09-29 16:59:43 Doing Diffie-Hellman group exchange
2010-09-29 16:59:43 Doing Diffie-Hellman key exchange with hash SHA-1
2010-09-29 16:59:43 Host key fingerprint is:
2010-09-29 16:59:43 ssh-rsa 2048 e5:89:d2:23:e2:33:7d:b9:57:7b:56:1b:3a:2b:5b:22
2010-09-29 16:59:43 Initialised AES-256 SDCTR client->server encryption
2010-09-29 16:59:43 Initialised HMAC-SHA1 client->server MAC algorithm
2010-09-29 16:59:43 Initialised AES-256 SDCTR server->client encryption
2010-09-29 16:59:43 Initialised HMAC-SHA1 server->client MAC algorithm
2010-09-29 16:59:43 Reading private key file "C:\Documents and Settings\admin\Desktop\keys\pvt.ppk"
2010-09-29 16:59:43 Offered public key
2010-09-29 16:59:43 Offer of public key accepted
2010-09-29 16:59:43 Access granted
2010-09-29 16:59:43 Opened channel for session
2010-09-29 16:59:43 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2010-09-29 16:59:43 Started a shell/command


where as for Server C

2010-09-29 17:00:51 Looking up host "x.x.x.x"
2010-09-29 17:00:51 Connecting to x.x.x.x port 22
2010-09-29 17:00:51 Server version: SSH-2.0-OpenSSH_4.6
2010-09-29 17:00:51 We claim version: SSH-2.0-PuTTY_Release_0.60
2010-09-29 17:00:51 Using SSH protocol version 2
2010-09-29 17:00:51 Doing Diffie-Hellman group exchange
2010-09-29 17:00:52 Doing Diffie-Hellman key exchange with hash SHA-256
2010-09-29 17:00:52 Host key fingerprint is:
2010-09-29 17:00:52 ssh-rsa 1024 a2:61:f0:06:f6:4e:10:ac:21:5c:bf:bf:52:34:c0:9a
2010-09-29 17:00:52 Initialised AES-256 SDCTR client->server encryption
2010-09-29 17:00:52 Initialised HMAC-SHA1 client->server MAC algorithm
2010-09-29 17:00:52 Initialised AES-256 SDCTR server->client encryption
2010-09-29 17:00:52 Initialised HMAC-SHA1 server->client MAC algorithm
2010-09-29 17:00:52 Reading private key file "C:\Documents and Settings\admin\Desktop\keys\pvt.ppk"
2010-09-29 17:00:55 Sent password
2010-09-29 17:00:55 Access granted
2010-09-29 17:00:55 Opened channel for session
2010-09-29 17:00:55 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2010-09-29 17:00:55 Started a shell/command
 
Old 10-08-2010, 03:26 PM   #12
jindalarpan
Member
 
Registered: Mar 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jindalarpan View Post
I have found out some thign
that
the putty event log for server B is


2010-09-29 16:59:43 Looking up host "x.x.x.y"
2010-09-29 16:59:43 Connecting to x.x.x.y port 22
2010-09-29 16:59:43 Server version: SSH-2.0-OpenSSH_4.3
2010-09-29 16:59:43 We claim version: SSH-2.0-PuTTY_Release_0.60
2010-09-29 16:59:43 Using SSH protocol version 2
2010-09-29 16:59:43 Doing Diffie-Hellman group exchange
2010-09-29 16:59:43 Doing Diffie-Hellman key exchange with hash SHA-1
2010-09-29 16:59:43 Host key fingerprint is:
2010-09-29 16:59:43 ssh-rsa 2048 e5:89:d2:23:e2:33:7d:b9:57:7b:56:1b:3a:2b:5b:22
2010-09-29 16:59:43 Initialised AES-256 SDCTR client->server encryption
2010-09-29 16:59:43 Initialised HMAC-SHA1 client->server MAC algorithm
2010-09-29 16:59:43 Initialised AES-256 SDCTR server->client encryption
2010-09-29 16:59:43 Initialised HMAC-SHA1 server->client MAC algorithm
2010-09-29 16:59:43 Reading private key file "C:\Documents and Settings\admin\Desktop\keys\pvt.ppk"
2010-09-29 16:59:43 Offered public key
2010-09-29 16:59:43 Offer of public key accepted
2010-09-29 16:59:43 Access granted
2010-09-29 16:59:43 Opened channel for session
2010-09-29 16:59:43 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2010-09-29 16:59:43 Started a shell/command


where as for Server C

2010-09-29 17:00:51 Looking up host "x.x.x.x"
2010-09-29 17:00:51 Connecting to x.x.x.x port 22
2010-09-29 17:00:51 Server version: SSH-2.0-OpenSSH_4.6
2010-09-29 17:00:51 We claim version: SSH-2.0-PuTTY_Release_0.60
2010-09-29 17:00:51 Using SSH protocol version 2
2010-09-29 17:00:51 Doing Diffie-Hellman group exchange
2010-09-29 17:00:52 Doing Diffie-Hellman key exchange with hash SHA-256
2010-09-29 17:00:52 Host key fingerprint is:
2010-09-29 17:00:52 ssh-rsa 1024 a2:61:f0:06:f6:4e:10:ac:21:5c:bf:bf:52:34:c0:9a
2010-09-29 17:00:52 Initialised AES-256 SDCTR client->server encryption
2010-09-29 17:00:52 Initialised HMAC-SHA1 client->server MAC algorithm
2010-09-29 17:00:52 Initialised AES-256 SDCTR server->client encryption
2010-09-29 17:00:52 Initialised HMAC-SHA1 server->client MAC algorithm
2010-09-29 17:00:52 Reading private key file "C:\Documents and Settings\admin\Desktop\keys\pvt.ppk"
2010-09-29 17:00:55 Sent password
2010-09-29 17:00:55 Access granted
2010-09-29 17:00:55 Opened channel for session
2010-09-29 17:00:55 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2010-09-29 17:00:55 Started a shell/command


Hello any one on this ?
 
Old 10-08-2010, 04:08 PM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well it's not offering the key there, but that would feel like it doesn't think it is allowed to. Run sshd on the server side in debug mode and post the equivalent logs from there.
 
Old 10-08-2010, 04:11 PM   #14
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Do not quote your whole previous post just only askig if somebody read it. Possibly we are busy thinking of your problem.
 
Old 10-09-2010, 11:46 AM   #15
bharathvn
Member
 
Registered: Mar 2005
Distribution: Redhat , Debian
Posts: 43

Rep: Reputation: 15
Check the folder and file permission for authorised_key and its parent folder.ssh set to its ownner i.e user connecting.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Passwordless SSH cccc Linux - Networking 9 12-27-2009 07:04 AM
Passwordless ssh isn't dcroxton Linux - Software 8 07-18-2008 12:16 PM
Can't use passwordless ssh sunhui Linux - Security 1 10-03-2006 08:29 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM
Regarding Passwordless SSH nedian123 Linux - Software 1 08-05-2004 05:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration