LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2012, 08:09 AM   #1
HGScherneck
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Rep: Reputation: Disabled
SSH passwordless login fails at send_pubkey_test


I try to log in with ssh passwordless into a server that I've set up. sshd is running there. I can log in with password.
When I set up the crypto (ssh-keygen -t ecdsa) and install the pub key at the host, I can't login anymore, not by defaulting to password either.

What can cause communication to stop at this point:
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
Connection closed by 999.999.999.999

Pubkey does not arrive at the server. Looking at other people's logs their problems occur later in the process. This one seems new.

Causes I can exclude:
sshd_config requests Protocol 2

My key pairs are in /home/user/.ssh with the privileges set as needed. The pub key has been cat >> server:/home/user/.ssh/authorized_keys, privil: -rw-r--r-
The log shows that id_ecdsa is detected and okayed.
I have renewed .ssh/known_hosts
My /var/empty is not writable except for root.

Does the pubkey sending go through a different port, not 22? Is there a timeout setting that one can change?

You may suspect this is CYGWIN-specific. No insult! One of you might know the solution. Be kind to me.

Last edited by HGScherneck; 01-20-2012 at 08:24 AM.
 
Old 01-20-2012, 08:36 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
Why do you think ther key doesn't reach the server? that seems like a very specific thing to say.

/home/user/.ssh should be set to 700
/home/user/.ssh/authorized_keys should be set to 600

at present, anyone on your system can read your public keys... that isn't too great an idea, so SSH is probably refusing to play ball until you sort out the permissions.

Mind you, actually that is an odd point in the process for things to choke...

Last edited by acid_kewpie; 01-20-2012 at 08:38 AM.
 
Old 01-20-2012, 08:39 AM   #3
Imarkus88
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 0
have you check that your server allow you to login with key authentication?

take a look at your configuration and make sure you found this line:
PubkeyAuthentication yes
 
Old 01-20-2012, 09:12 AM   #4
HGScherneck
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
SSH passwordless login fails at send_pubkey_test

Hi, thanks acid_kewpie and Imarkus88
I supplied too little info. Please see the debug output of ssh -vvv at
http://froste.oso.chalmers.se/hgs/cygwin

@Imarkus88:
In /etc/sshd_config I assume
#PubkeyAuthentication yes
is the default setting = yes. I have tested this on another machine, it's the same sshd_config setting, but there the login works.
Also, since the server processes the id_edcsa and okays it with the known_hosts, it suggests to me the machines are working at PubkeyAuthentication

@ acid_kewpie:
That's how the directory at the server is protected
ls -la
total 23
drwx------+ 1 HGS None 0 Jan 20 12:01 .
drwx------+ 1 HGS None 0 Jan 20 15:36 ..
-rw------- 1 HGS None 361 Jan 20 12:02 authorized_keys
-rw-r--r-- 1 HGS None 1009 Jan 20 15:37 known_hosts

and here at the host
drwx------+ 1 Hans Georg Scherneck Ingen 0 Jan 20 12:05 .
drwx------+ 1 Hans Georg Scherneck Ingen 0 Jan 20 12:00 ..
-rw-r--r-- 1 Hans Georg Scherneck Ingen 175 Jan 19 20:52 authorized_keys
-rw------- 1 Hans Georg Scherneck Ingen 227 Jan 20 12:00 id_ecdsa
-rw-r--r-- 1 Hans Georg Scherneck Ingen 186 Jan 20 12:00 id_ecdsa.pub
-rw-r--r-- 1 Hans Georg Scherneck Ingen 1963 Jan 20 12:04 known_hosts

If you think the problem stinks too much cygwin, I apologize.

Last edited by HGScherneck; 01-20-2012 at 09:17 AM.
 
Old 01-20-2012, 09:32 AM   #5
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
i'd be more interested in what the server debugs say rather than the client.
 
Old 01-20-2012, 09:45 AM   #6
HGScherneck
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
The only log I see updated today is /var/log/lastlog
and that one seems corrupt. Sorry.
Nevertheless, I've put it into in http://froste.oso.chalmers.se/hgs/cygwin/lastlog.txt
Anything you can suggest to remedy this?
Thanks in advance
HGS

Last edited by HGScherneck; 01-20-2012 at 09:47 AM.
 
Old 01-20-2012, 09:50 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
You need to stop sshd and run it in the foreground (find what the service command line is with a "ps -ef" and copy that), with a -vvv on the command line, that'll give you plenty to work on.

Remember that as SSH is heavily security orientated part of the game is to not give information back to the client which leak details about other ways to attack you so "go away" is normally as good an error to hope for on the client. They aren't meant to be useful errors.

Last edited by acid_kewpie; 01-20-2012 at 09:52 AM.
 
Old 01-20-2012, 10:01 AM   #8
HGScherneck
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi again,
cannot run sshd in foreground. This limitation is cygwin-specific. Don't bother any more, Linux is better.
Thanks for your time. I'll turn to the cygwin community instead.
/HGS
 
  


Reply



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 login between different users instances AErin Ubuntu 1 07-01-2010 08:08 AM
Passwordless login in using ssh via non root user kenpachi Linux - Newbie 3 02-15-2010 10:37 AM
Passwordless SSH login triley Linux - General 3 11-14-2008 03:07 PM
Cannot set up passwordless login via ssh slinx Linux - Software 5 09-19-2008 09:37 AM
passwordless login on the same machine via ssh athreyavc Linux - Server 2 06-20-2008 12:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:03 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