You are not logged in.
I'm rebuilding my slicehost slice and while setting up ssh, I'm having problems using any port other than 22. I keep getting this error message.
[zack@robot ~]$ ssh username@website.net -p 6666
ssh: connect to host website.net port 6666: Connection refused
Running netstat -l shows the service running, and using the web console from slicehost, running the above ssh command works localy with the correct port, but not from outside.
I'm only using a different port to reduce the log entries from bots trying to connect on port 22. And 6666 isn't the one I'm actually trying to use, but I'm not trying to use one of the 'well known' ports.
Now if I change the port number in ssh_config, sshd_config and iptables.rules to 22 and restart the services, everything works just fine. I can't figure out where my problem is.
Last edited by Sjoden (2009-03-31 21:05:38)
Offline
Slicehost doesn't block "weird" ports at the border, does it?
Offline
Slicehost doesn't block "weird" ports at the border, does it?
Agh, I really hope not.
I installed lighttpd and was able to have that listen on port 80 and I could view the little index.html I made, but I couldn't connect to ssh running on port 80. I did change the port in ssh_config and sshd_config, and I restarted the service afterward. I didn't try both at the same time. I tried lighttpd after ssh failed. When I started lighttpd, it complained saying that it couldn't bind port 80, which meant ssh was, but I still wasn't able to connect to it.
Offline
Do you have a local firewall running, on either end (ie, on the slicehost, or at home / work / where ever you're connecting from)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Unsure but I think /etc/hosts.allow uses /etc/services. If it does only port 22 is being allowed?
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Unsure but I think /etc/hosts.allow uses /etc/services. If it does only port 22 is being allowed?
This isn't the problem. I run ssh on non-standard ports and I've never had to adjust hosts.allow or /etc/services apart from the normal mods (sshd=ALL)
Last edited by fukawi2 (2009-03-31 04:37:07)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Running a slice myself here, and the SSH port is non-standard too. Sshd is allowed in /etc/hosts.allow, but you can't specify ports there afaik, and /etc/services isn't modified.
/etc/services is for human reference. The hosts.{allow,deny} files work with the name of the executable, not with the type of service they provide, or the protocol's name.
Fukawi's firewall remark deserves looking into; a lot of companies will only allow certain outgoing ports (at my job only HTTP(S) is allowed for example, no SSH ).
Last edited by B (2009-03-31 05:53:53)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I feel so stupid. It was my firewall at work. I wasn't thinking, I figured that the firewall wouldn't care what traffic was running over ports 80 and 443, but I guess I was wrong. I tried the 'outside' dsl line we have and it worked fine. I just can't believe I had never tried to set this up at home, because it would have worked the first try.... I've never tried it on this dsl line because it's so slow, but oh well. Thanks for the replies.
Last edited by Sjoden (2009-03-31 21:10:38)
Offline