mystified Posted January 6, 2007 Report Share Posted January 6, 2007 I have a fairly new router, a Netgear which is very similar to my old router. I have port forwarding set at port 22 for ssh and I can ssh into the board server but I can't ssh into my other linux box. Here's the error: mystified@localhost ~ $ ssh 192.168.1.2 ssh: connect to host 192.168.1.2 port 22: Connection refused Any suggestions? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted January 6, 2007 Report Share Posted January 6, 2007 Check that the service on the machine you are trying to connect to is running. Do a: netstat -tan on the machine to see if port 22 is listening. Check /etc/hosts.deny and see if it has an: ALL: ALL: DENY if so this could be why as well. And check if firewall is on this machine, iptables or shorewall or something that might be blocking the port from listening. Normally you only need to enable on the router if you're trying to connect when not at home, say from work, or some other location. All I can think of right now. Quote Link to comment Share on other sites More sharing options...
mystified Posted January 6, 2007 Author Report Share Posted January 6, 2007 It occured to me that ssh may not be running in the Mandriva box. I'm so use to Gentoo and I have ssh set to run as default. I have no idea how to check it in Mandriva since the usual command doesn't work. Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted January 6, 2007 Report Share Posted January 6, 2007 You can check in mcc under Services or you can run as root: # chkconfig --list to list all available services and their status for every run level. For just sshd do: # chkconfig --list sshd Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted January 6, 2007 Report Share Posted January 6, 2007 And you can enable with: chkconfig sshd on or start manually with: service sshd start If it's not there, install with: urpmi ssh-server Quote Link to comment Share on other sites More sharing options...
mystified Posted January 7, 2007 Author Report Share Posted January 7, 2007 Ok, I had installed openssh but not ssh-server. Now it works. Thanks guys. Like I said, I'm just used to doing things the Gentoo way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.