Click to See Complete Forum and Search --> : ssh woes


pressman57
02-06-2005, 02:39 PM
Hi all. I'm having a problem getting any kind of
connectivity between a PC running Mandrake 10.1
and a PPC running YDL2.3 through a Linksys router.

I installed sshd, wu-ftp and webmin on the Mac and
have sucessfully started the services on the correct
ports, I think:

[root@localhost greg]# netstat -lpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program
name
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 837/X
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 773/perl
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1016/ftpd:
acceptin
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 580/sshd
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 718/cupsd
udp 0 0 0.0.0.0:776 0.0.0.0:* 600/xinetd
udp 0 0 0.0.0.0:10000 0.0.0.0:* 773/perl
udp 0 0 0.0.0.0:631 0.0.0.0:* 718/cupsd

But when I try to either ssh or ftp into the Mac from the PC
I get an error saying the connection was refused. According to
webmin I have no firewall configured, and have tried stopping
iptables to no avail. Nothing unusual has showed up in
/var/log/messages that I can see. I had the server installation
of YDL2.2 running on the same machine (before the hard-drive
crapped out) and ssh worked, so I don't think it's a hardware
issue. One suggestion I found suggested adding the line
sshd:ALL to /etc/hosts.allow but that didn't work either.

I really have searched the lists on this one and can't find
any solution. Any help would be greatly appreciated.

Greg Richardson

garskoci
02-06-2005, 02:52 PM
Can you ssh to any of the boxes by using the IP address?
BTW, ssh uses port 22. cat /etc/services

pressman57
02-06-2005, 02:56 PM
Actually that's the method I've been trying:

ssh -l greg xxx.xxx.x.xxx
or
ssh greg@xxx.xxx.x.xxx
give the same result

psi42
02-06-2005, 02:58 PM
Can you ssh localhostfrom the mac?

pressman57
02-06-2005, 03:01 PM
Yessir. If I do that I get a login prompt.

I just thought of something. Both hostnames are the same. Would changing one of them make a difference, and if so how does one do that?

And thank you for the reply

garskoci
02-06-2005, 04:40 PM
Can you ping all of the boxes by IP? Is sshd running on the boxes?

pressman57
02-06-2005, 05:00 PM
Yes, I can ping both ways without any packet loss.

pressman57
02-06-2005, 05:02 PM
And sshd is running on the Mac, port 22.

Modorf
02-06-2005, 10:22 PM
try nmap to determin which services are actually open.

nmap ipaddress

garskoci
02-06-2005, 11:37 PM
ssh should be running on the other box too.

LinuxFanatic
02-07-2005, 01:10 AM
As I understand, you want to connect from your pc (linux
presumably) to the Mac. Then you should have a ssh server
in Mac and ssh client in linux. Then, the port in which the
server is accepting connection should be open to receive
connection. As I see, form the firewall configuration,
the port in which the server is accepting connection is 580
(was it 480?), which is not the default port. So I think you
should specically tell your client to try access that port:

try :
ssh -p ssh_port user@ip.add.of.mac

Hope this helps.

pressman57
02-08-2005, 10:11 PM
I think I figured it out. I stopped iptables from webmin and that opened up the port. Why it didn't work from the command line I don't know. Thanks for the replies.