Dirk ssh -v -v -v
returns nothing, and I am get no log information.
the problem is the openssh which does not start even when it is
started.
Indicates that the problem is the daemon which doesn't start.
Run this (sudo chkconfig --list sshd
), and show us the output. On my machine it looks as follows:
$ chkconfig --list sshd
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
also run service sshd restart
and show the output - should look like this, first line is likely "Failed" or so in your case:
$ sudo service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
To start it upon boot do:
sudo chkconfig sshd on
and list again what it looks like with
chkconfig --list sshd
After that step continue debugging with the steps outlined below the horizontal rule if you're still having trouble.
First verify sshd
is indeed running on its default port:
sudo lsof -i :22
(you can also use one of the netstat
lines suggested in comments).
Assuming Linux - you gave no indication which OS you are using - try something along the lines of /etc/init/sshd restart
. The name of the service could of course differ, e.g. be openssh
, ssh
or so ...
What I have been doing in the past to diagnose ssh
problems both on the server-side and the client-side is something similar to what Dirk suggests in his answer ... but extended.
You want to use the same machine, fine. So run in one tab/window the command (for the "server"):
sudo $(which sshd) -dDp 22222
on the client side run:
ssh -vvvvp 22222 localhost
Does the first tab/window show anything? If it doesn't we already have an indication. It's likely some weird firewall rule or you gave some strange setting for the Listen
directive in /etc/ssh/sshd_config
. If that's the case please paste it and we'll go from there.
1Can you see a listen port?
netstat -lnt | grep 22
What doeschkconfig --list sshd
say? – Rich Homolka – 2013-03-11T20:27:01.937How do you start the service? How do you get the status? Do you have a firewall activated? Is the ssh port you are using in the firewall rules? Which is your sshd port (you can get it with
grep -i ^port /etc/ssh/sshd_config
). – erik – 2013-03-11T20:43:41.270@ray, if you don't have anything listening, it obviously won't let you log in. Try
service sshd start
and then see if it's listening. – Rich Homolka – 2013-03-11T21:02:55.063We're working on getting your accounts merged. Once that's done, you can add comments to answers below. – slhck – 2013-03-11T21:11:56.997