[svlug] New to the list, question about Red Hat 9 ftp & ssh

Akbar S. Ahmed akbar501 at dslextreme.com
Sat Nov 15 13:09:48 PST 2003


Skip Evans wrote:
> Our problem is the Red Hat machines are unable to ssh and
> ftp to each other, even though we have put our respetive IP
> addresses in the hosts.allow files and I think we have the firewall 
> settings okay, but obviously we are missing something. We get 
> 'Connection refused' messages each time we try.

First, check that you can ping the other machine.

Next, check that the sshd daemon is running:
# /etc/init.d/sshd status

If it is stopped then do:
# /etc/init.d/sshd start
# chkconfig --level 345 sshd on

Next, check your log files to see if it says what the exact cause of 
rejection is:
# tail /var/log/secure

If the log files state the exact cause of failure, then track down the 
problem. If not, then continue as follows:

Try to logon to the local machine from the local machine. This may help 
to inform you if the problem is with the firewall.

$ ssh <ip_address>

So, if your ipaddr is 192.168.1.5, then try (note: do this when you are 
on the 192.168.1.5 machine)

$ ssh 192.168.1.5

If this works, then you know that the machine is accepting incoming ssh 
requests, and that you have network connectivity from the first step. At 
this point I would make sure that your username and password are correct 
on the machine that you are trying to logon to.

If the problem is with your firewall, you want to look for ports 22(ssh) 
and 21 (ftp) in your iptables file:

# grep 22 /etc/sysconfig/iptables
# grep 21 /etc/sysconfig/iptables

Look for the work "ACCEPT" at the end of the line. If you do not see 
this then the default firewall settings are most likely blocking these 
ports.

- Akbar







More information about the svlug mailing list