FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-12-2011, 04:55 AM
Bill
 
Default ssh woes

Hi folks,

I've Googled myself blind over this one, but all I can find are
hundreds of people with the same problem and no real solutions.
I suspect the answer is staring me in the face but I just don't
see it.

While I can ssh from my desktop to my laptop, I cannot ssh from
my laptop to my desktop. However, I can ping the desktop from
the laptop no problem. Likewise I can scp files to/from the
laptop as long as I am working on the desktop.

When I try and ssh from the laptop to the desktop I get the
error message:
Read from socket failed: Connection reset by peer

Here's some additional output:

me@laptop:~$ ssh -vvv desktop

OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to desktop [192.168.1.10] port 22.
debug1: Connection established.

debug3: Not a RSA1 key file /home/me/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/me/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/me/.ssh/id_rsa-cert type -1
debug1: identity file /home/me/.ssh/id_dsa type -1
debug1: identity file /home/me/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version
OpenSSH_4.3p2 Debian-9
debug1: match: OpenSSH_4.3p2 Debian-9 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-6
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer


And from the desktop side in /var/log/auth.log

Jun 11 20:30:26 desktop sshd[2575]: error: Could not load host
key: /etc/ssh/ssh_host_rsa_key
Jun 11 20:30:26 desktop sshd[2575]: error: Could not load host
key: /etc/ssh/ssh_host_dsa_key

Any suggestions here?

b.





--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1307854519.2438.31.camel@zefram.soho.lan">http://lists.debian.org/1307854519.2438.31.camel@zefram.soho.lan
 
Old 06-12-2011, 05:09 AM
William Hopkins
 
Default ssh woes

On 06/11/11 at 09:55pm, Bill wrote:
> Hi folks,
>
> I've Googled myself blind over this one, but all I can find are
> hundreds of people with the same problem and no real solutions.
> I suspect the answer is staring me in the face but I just don't
> see it.
>
> While I can ssh from my desktop to my laptop, I cannot ssh from
> my laptop to my desktop. However, I can ping the desktop from
> the laptop no problem. Likewise I can scp files to/from the
> laptop as long as I am working on the desktop.
>
> When I try and ssh from the laptop to the desktop I get the
> error message:
> Read from socket failed: Connection reset by peer
>
> Here's some additional output:
>
> me@laptop:~$ ssh -vvv desktop
>
> OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for *
> debug2: ssh_connect: needpriv 0
> debug1: Connecting to desktop [192.168.1.10] port 22.
> debug1: Connection established.
>
> debug3: Not a RSA1 key file /home/me/.ssh/id_rsa.
> debug2: key_type_from_name: unknown key type '-----BEGIN'
> debug3: key_read: missing keytype
> debug3: key_read: missing whitespace
> debug2: key_type_from_name: unknown key type '-----END'
> debug3: key_read: missing keytype
> debug1: identity file /home/me/.ssh/id_rsa type 1
> debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
> debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
> debug1: identity file /home/me/.ssh/id_rsa-cert type -1
> debug1: identity file /home/me/.ssh/id_dsa type -1
> debug1: identity file /home/me/.ssh/id_dsa-cert type -1
> debug1: Remote protocol version 2.0, remote software version
> OpenSSH_4.3p2 Debian-9
> debug1: match: OpenSSH_4.3p2 Debian-9 pat OpenSSH_4*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-6
> debug2: fd 3 setting O_NONBLOCK
> debug1: SSH2_MSG_KEXINIT sent
> Read from socket failed: Connection reset by peer
>
>
> And from the desktop side in /var/log/auth.log
>
> Jun 11 20:30:26 desktop sshd[2575]: error: Could not load host
> key: /etc/ssh/ssh_host_rsa_key
> Jun 11 20:30:26 desktop sshd[2575]: error: Could not load host
> key: /etc/ssh/ssh_host_dsa_key
>
> Any suggestions here?

Yes. Try
#ssh -o PreferredAuthentications=password
and paste the output

--
Liam
 
Old 06-12-2011, 05:12 AM
Bill
 
Default ssh woes

On Sat, 2011-11-06 at 21:55 -0700, Bill wrote:
> Hi folks,
>
> I've Googled myself blind over this one, but all I can find are
> hundreds of people with the same problem and no real solutions.
> I suspect the answer is staring me in the face but I just don't
> see it.
>
> While I can ssh from my desktop to my laptop, I cannot ssh from
> my laptop to my desktop. However, I can ping the desktop from
> the laptop no problem. Likewise I can scp files to/from the
> laptop as long as I am working on the desktop.
>
> When I try and ssh from the laptop to the desktop I get the
> error message:
> Read from socket failed: Connection reset by peer
>
> Here's some additional output:
>
> me@laptop:~$ ssh -vvv desktop
>
> OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for *
> debug2: ssh_connect: needpriv 0
> debug1: Connecting to desktop [192.168.1.10] port 22.
> debug1: Connection established.
>
> debug3: Not a RSA1 key file /home/me/.ssh/id_rsa.
> debug2: key_type_from_name: unknown key type '-----BEGIN'
> debug3: key_read: missing keytype
> debug3: key_read: missing whitespace
> debug2: key_type_from_name: unknown key type '-----END'
> debug3: key_read: missing keytype
> debug1: identity file /home/me/.ssh/id_rsa type 1
> debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
> debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
> debug1: identity file /home/me/.ssh/id_rsa-cert type -1
> debug1: identity file /home/me/.ssh/id_dsa type -1
> debug1: identity file /home/me/.ssh/id_dsa-cert type -1
> debug1: Remote protocol version 2.0, remote software version
> OpenSSH_4.3p2 Debian-9
> debug1: match: OpenSSH_4.3p2 Debian-9 pat OpenSSH_4*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-6
> debug2: fd 3 setting O_NONBLOCK
> debug1: SSH2_MSG_KEXINIT sent
> Read from socket failed: Connection reset by peer
>
>
> And from the desktop side in /var/log/auth.log
>
> Jun 11 20:30:26 desktop sshd[2575]: error: Could not load host
> key: /etc/ssh/ssh_host_rsa_key
> Jun 11 20:30:26 desktop sshd[2575]: error: Could not load host
> key: /etc/ssh/ssh_host_dsa_key
>
> Any suggestions here?


Well I was right. I was looking in the wrong place. In writing
the original email message I provided information about error
messages on both the desktop and the laptop. On a hunch, I
compared the /etc/ssh/ directories on both. The laptop had
keys in it whereas the desktop did not for some reason. I'd
spent most of my time looking on the laptop not the desktop
and in ~/.ssh not in /etc/ssh. And so:

root@desktop:/etc/ssh#
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key

generated the necessary keys and I was able to ssh from the
laptop. Simple really. Just looking in the wrong place. As
usual. But alls well that ends well.

Hope this helps someone else.

b.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1307855568.2438.37.camel@zefram.soho.lan">http://lists.debian.org/1307855568.2438.37.camel@zefram.soho.lan
 
Old 06-12-2011, 06:04 AM
Bill
 
Default ssh woes

On Sun, 2011-12-06 at 01:09 -0400, William Hopkins wrote:
> Yes. Try
> #ssh -o PreferredAuthentications=password
> and paste the output

PreferredAuthentications doesn't seem to be a correct option.
Nor does it show up in /etc/ssh/ssh_config or /etc/ssh/sshd_config.
Perhaps this is because I used the empty string when creating
keys?

b.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1307858648.2438.43.camel@zefram.soho.lan">http://lists.debian.org/1307858648.2438.43.camel@zefram.soho.lan
 
Old 06-12-2011, 07:10 AM
William Hopkins
 
Default ssh woes

On 06/11/11 at 11:04pm, Bill wrote:
> On Sun, 2011-12-06 at 01:09 -0400, William Hopkins wrote:
> > Yes. Try
> > #ssh -o PreferredAuthentications=password
> > and paste the output
>
> PreferredAuthentications doesn't seem to be a correct option.
> Nor does it show up in /etc/ssh/ssh_config or /etc/ssh/sshd_config.
> Perhaps this is because I used the empty string when creating
> keys?

#man 5 ssh_config

PreferredAuthentications
Specifies the order in which the client should try protocol 2
authentication methods. This allows a client to prefer one method
(e.g. keyboard-interactive) over another method (e.g. password)
The default for this option is: “gssapi-with-mic,hostbased,publickey,
keyboard-interactive,password”.

It not being in your /etc/ssh/ssh_config means you're not overriding the
default, that's all.

--
Liam
 
Old 06-12-2011, 07:14 AM
Bill
 
Default ssh woes

On Sun, 2011-12-06 at 03:10 -0400, William Hopkins wrote:
>
> It not being in your /etc/ssh/ssh_config means you're not overriding
> the default, that's all.

Ok. Thanks. I was curious.

b.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1307862890.2438.47.camel@zefram.soho.lan">http://lists.debian.org/1307862890.2438.47.camel@zefram.soho.lan
 

Thread Tools




All times are GMT. The time now is 04:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org