On Sat, 13 Aug 2005 22:08, Carl Cerecke wrote:
> OK. I've updated openssh from yast online update. (No, I had no
> security updates or anything.
> Yes, I'm a bad boy. I'll blame it on having had a dial-up only for so
> long.)
>
> The rpm checks out OK. This is what happens when I try to start sshd.
> First, using the
> rc script, then directly:
> linux:~ # rcsshd start
> Starting SSH daemon
>                failed
> linux:~ # sshd
> linux:~ # ssh 127.0.0.1
> ssh: connect to host 127.0.0.1 port 22: Connection refused
> linux:~ # rpm -qf `which sshd`
> openssh-3.8p1-37.17
> linux:~ #
>
> Just to prove to you doubters that it really does kind-of connect OK
> to port 22, here's
> the output from strace:
>
> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
> connect(3, {sa_family=AF_INET, sin_port=htons(22),
> sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> getsockname(3, {sa_family=AF_INET, sin_port=htons(32776),
> sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
> close(3)                                = 0
>
>
> That last close is a bit suspicious. Especially because there were no
> dup/dup2 calls. Yes,
> I did an ltrace also - but it didn't help either.
>
> I even tried "rcSuSEfirewall2 stop" before trying to start sshd, but
> no joy either.
>
> Giving up for the night,
> Carl.
You can check which servers are running with the    lsof -i   command. vis:-
imogen ~ # lsof -i
COMMAND  PID   USER   FD   TYPE DEVICE SIZE NODE NAME
identd  8877 nobody    3u  IPv4   8559       TCP *:auth (LISTEN)
sshd    9023   root    3u  IPv4   8698       TCP *:ssh (LISTEN)

You can connect to a running server using the netcat command  nc. vis:-
imogen ~ # nc localhost 22
SSH-2.0-OpenSSH_4.1

netcat is sometimes known as the Swiss Army Knife for network admins.
Locally, the original source code file is available from:-

ftp://linux.jetstreamgames.co.nz/dist/gentoo/distfiles/nc110.tgz

It has been patched, and cloned for IPV6, by many of the Linux distros, and 
completely re-written by the GNU folks.

It is also on the BG-Rescue boot floppy set.
http://omnibus.uni-freiburg.de/~giannone/rescue/current/

Every selfrespecting Linux/Unix geek should always have these tools to hand.

-- 
CS

Reply via email to