April 11th, 2003 10:32 AM
Can't connect eh? Try the following:
I just set up my old system to run Red Hat 8, and I want to give some of my friends shells so they can explore linux. I've made a user, we'll call it 'dan'. I gave dan my ip address, and the port. He said he can't connect.
I figured the problem could be:
- tcp wrappers misconfigured?
1.) Do you have sshd/telnetd running? Do a netstat -atunp | grep LISTEN and see if ports 22 and/or 23 are listening.
2.) Is iptables/ipchains in the way? service iptables stop will turn off your firewall to check but don't leave it turned off.
3.) Is you network properly hooked up. Duh? No crossover/patch cable where they shouldn't be?
4.) Did you give your friend the right IP. Has it changed since you told him via DHCP?
There's heap of reason why he might not be able to connect. Be more specific.
OpenBSD - The proactively secure operating system.
April 11th, 2003 12:07 PM
This is what I got for sshd when I did a netstat -atunp | grep LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 6
I get this when I 'ssh localhost':
[jimmy@localhost jimmy]$ ssh localhost
ssh_exchange_identification: Connection closed by remote host
My network is setup properly, and I gave my friend the correct IP. Regardless of that, I should still be able to connect on the same machine, correct?
April 11th, 2003 05:15 PM
I had a similar problem...
Check your logs /var/log/secure and messages, this will at least let you know if the attempted connections arrived or not. If so you will probably see a similar message to what you received through your client. If your machine is rejecting these sessions make the adjustments to your /etc/hosts.allow and hosts.deny files. You will probably need something a little more secure but:
sshd sshd1 sshd2 : ALL : ALLOW
Should work to test at least...