Alright, first we need to find out if the computer is listening on the ssh port (22), for that we’ll use “netstat -a” at a command prompt, should get something like this:
You’ll see a list like this of all ports the machine is listening too, if sshd is running you’ll a line like the bolded one above.
If it’s not running you’ll need to start it. If sshd was installed as part of the redhat install there will be a control script for it in /etc/init.d (or /etc/rc.d/init.d for older RH installs) So ‘cd’ to this directory and run the sshd script to see it’s status:
If it’s not running it’ll say something about the process being stopped. In that case you’ll run the script again, as root:
If sshd has never been stated on the machine before it will go through a little song and dance to creat it’s key’s and whatnot, just follow the prompts and you’ll be fine.
Now if sshd is running but you’re still getting connection refused messages then a couple of things could be wrong. First off try sshing from the linux box to itself:
ssh localhost
It should let connect just fine, even if tcp_wrappers or a firewall is blocking other access. If you still get connection refused messages like this double check that sshd is in fact running.
If you’re able to connect locally like this but ar still unable to connect from your winders box then it may be a hosts.allow or firewall problem. For hosts.allow add the following line:
sshd:ALL
Then restart sshd so it reads in the new hosts.allow info:
/etc/init.d/sshd restart
you can worry about tightening up the security later, right now we’re just concerned with getting it working. Try again from the winders box. If it still isn’t working then check the sshd config file, should be:
/etc/ssh/sshd_config
or something similar, if in doubt just type “locate sshd_config”
Read over the file and look for anything that would indicate whether or not sshd is configured to accecpt connections from certain IPs or not. You probably won’t find anything but it’s worth checking.
If you’ve done all of the above and still can’t connect then it may be a default Redhat firewall in which case I can’t help you much since I’ve never let RH install a firewall for me, as all of my machines are behind a dedicated firewall machine which I configure by hand. Check /etc/init.d and see if there is a firewall script in there, if so something like:
./firewall stop
should turn it off. Hope this helps.
If you need more help after this post again or email me direct and we’ll see what else we can try!