Page 1 of 1

[SOLVED] Two-way network connection on sshd

PostPosted: Sep 21st, '11, 08:57
by tarazed
Mageia 1 is a first class distribution. Long may it prosper. However
there is still the PEBCK issue to deal with. This is a newbie problem
essentially, one which has always caused me trouble. Two machines,
altair and canopus on a wireless network. They can ping each other
and canopus can scp and ssh to altair to its heart's content but
altair cannot respond. The hosts.allow files contain

sshd: altair
sshd: canopus

at both ends and shorewall allows the ssh service. Altair receives
the message "cannot connect to port 22 on canopus" or something
similar whereas canopus generates the RSA key initially and is happy
thereafter. Canopus can also copy from altair.

Is there anything else to check?

Len

Re: [solved] Two-way network connection on sshd

PostPosted: Sep 21st, '11, 14:39
by tarazed
The message "connection refused" on port 22 meant that there was no server running on canopus. I had not realised that the server has to be installed as well as ssh. I had assumed that ssh and sshd were both part of the openssh package; not so. urpmi sshd then service sshd start.

Len

Re: Two-way network connection on sshd

PostPosted: Sep 21st, '11, 14:44
by wobo
When I
Code: Select all
ssh somewhere
then the server has to run on 'somewhere', same as with ftp client/server or other such connections.

Re: Two-way network connection on sshd

PostPosted: Sep 21st, '11, 14:58
by tarazed
Yes, that puzzled me but it looks as if ssh is self contained; as long as the authentication succeeds it actually does all the work but there has to be a listener at the other end (port 22). In my case I had probably installed sshd on altair at installation time (Mandriva 2010.1) by ticking ssh and OK-d it in the running services list, so canopus was clear to connect. If you miss it at installation time you have to be sure to install the separate packages later. Maybe ssh is a dependency of the sshd package.

Len

Re: [solved] Two-way network connection on sshd

PostPosted: Sep 21st, '11, 15:18
by isadora
tarazed wrote:The message "connection refused" on port 22 meant that there was no server running on canopus. I had not realised that the server has to be installed as well as ssh. I had assumed that ssh and sshd were both part of the openssh package; not so. urpmi sshd then service sshd start.

Len

My assumption is, that sshd is part of open-sshserver (package).

Code: Select all
[root@localhost ~]# rpm -ql openssh-server
/etc/avahi/services/openssh.service
/etc/pam.d/sshd
/etc/rc.d/init.d/sshd
/etc/ssh/denyusers
/etc/ssh/moduli
/etc/ssh/sshd_config
/etc/sysconfig/sshd
/etc/xinetd.d/sshd-xinetd
/usr/lib64/ssh
/usr/lib64/ssh/sftp-server
/usr/sbin/sshd
/usr/share/man/man5/moduli.5.xz
/usr/share/man/man5/sshd_config.5.xz
/usr/share/man/man8/sftp-server.8.xz
/usr/share/man/man8/sshd.8.xz
/var/empty

Re: Two-way network connection on sshd

PostPosted: Sep 21st, '11, 15:19
by doktor5000
ssh is not self contained, also the packages are not called ssh and sshd, that may only be virtual provides.
If you look at the real package names, it becomes clearer:
Code: Select all
[doktor5000@mageia1 ~]$ ufn openssh | sort
Core 32bit Release:openssh-5.8p1-2.mga1.i586
Core 32bit Release:openssh-askpass-5.8p1-2.mga1.i586
Core 32bit Release:openssh-askpass-common-5.8p1-2.mga1.i586
Core 32bit Release:openssh-askpass-gnome-5.8p1-2.mga1.i586
Core 32bit Release:openssh-askpass-qt4-1.0.1-4.mga1.i586
Core 32bit Release:openssh-clients-5.8p1-2.mga1.i586
Core 32bit Release:openssh-server-5.8p1-2.mga1.i586


Besides the -askpass-packages, you see that it is split in openssh, openssh-clients and openssh-server.

Re: Two-way network connection on sshd

PostPosted: Sep 21st, '11, 15:49
by tarazed
Thanks for the headsup. As somebody might have said; The road to hell is paved with assumptions.