Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Apr 19, 2004 12:49 am 
Offline
Junior Member

Joined: Wed Jul 16, 2003 1:43 am
Posts: 30
Website: http://www.alution.com
Location: Australia
Hi,

Im wondering if anyone can help me...

If i ssh into my linode, ie.. into li-*.members.linode.com the connection is closed by the host instantly (ie.. before I even have ssh'd in).

I've been doing a couple of reboots lately because i have been fideling with my disk images, but now can't ssh in.

If i go in using the console its fine.

Im using the redhat distro small.

Thanks
Alex


Top
   
 Post subject:
PostPosted: Mon Apr 19, 2004 9:53 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
What is the output of 'ssh -v li-....' on your client? This is normally useful in determining errors.

What does /var/log/messages and /var/log/secure show when you attempt to ssh in?

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Mon Apr 19, 2004 10:08 am 
Offline
Junior Member

Joined: Wed Jul 16, 2003 1:43 am
Posts: 30
Website: http://www.alution.com
Location: Australia
when i run ssh -v i get the following...

[root@li-* config]# ssh -v li-*.members.linode.com
OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to li-*.members.linode.com [64.5.53.*] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.5p1
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 64.5.53.*
debug1: Calling cleanup 0x80674e0(0x0)


For the other two calls, the files didnt exist, so I touched them, then tail -f the files while I try'ed to log in, but nothing happend. Did you mean watch them while I run ssh -v? or try and ssh in from my linode?

Thanks
Alex


Top
   
 Post subject:
PostPosted: Mon Apr 19, 2004 5:55 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Sounds like its a server-side problem, not client. So, give running the sshd deamon in debug mode a shot:

Log into your Linode via the console. Stop sshd (/etc/network/sshd stop, or whatever).

Then, run sshd in debug mode:

[linode]# sshd -d

It will start to spew out debug info, eventually waiting for a connection.

From another machine, attempt to ssh like normal into your Linode. The debug output via the console might give you an idea of what the problem is.

-Chris


Top
   
 Post subject:
PostPosted: Mon Apr 19, 2004 8:50 pm 
Offline
Junior Member

Joined: Wed Jul 16, 2003 1:43 am
Posts: 30
Website: http://www.alution.com
Location: Australia
thanks guys, worked it out after a little playing around. Im a bit concern tho because everything seems to be stuffing up and im past the point of no return.. ie.. i can't just do a clean install (which I would really like to do as there has been heaps of stuff going wrong...) as i have sites up on it now...

For example this is what I had to do to fix my ssh problem.

[root@amcms root]# /usr/sbin/sshd -d
debug1: sshd version OpenSSH_3.5p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
Missing privilege separation directory: /var/empty/sshd

So I made the directory /var/empty/sshd then..

[root@amcms root]# /usr/sbin/sshd -d
debug1: sshd version OpenSSH_3.5p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: Bind to port 22 on ::.
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
Cannot bind any address.

So then I killed all sshd processes (there was only one). Then ran /usr/bin/sshd -e again

After this I was then able to login.. However it then complained that /var/log/lastlog did not exist, so I touched that. Now it seems like its working ok.

However what I would really like to know is why this would of occured in the first place?


Top
   
 Post subject:
PostPosted: Tue Apr 20, 2004 4:03 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
zan wrote:
i can't just do a clean install (which I would really like to do as there has been heaps of stuff going wrong...) as i have sites up on it now...


If you have any unused disk space you could do a fresh OS install into that, and mount that into your existing OS. This would, at least, let you compare a fresh install against your running version to work out what is wrong.

You'd probably need to reboot to make the new image available in your OS profile.

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group