Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to route SSH connections from port 22 on the SSH machine to port 2222 on the xinetd machine, I get a connection refused error every time I try to connect through port 2222 on the xinetd machine. The SSH machine is running CentOS 5.4 and the xinetd machine is also running CentOS 5.4.

Xinetd service:

service 2222
socket_type = stream
port = 2222
wait = no
user = root
redirect = 22

And the Terminal output on my Mac:

Mac mini:~ Justin$ ssh -v -p 2222
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to [] port 2222.
debug1: connect to address port 2222: Connection refused
ssh: connect to host port 2222: Connection refused
Mac mini:~ Justin$ 

Any ideas?

Thanks :)

share|improve this question

Can you connect to from the xinetd machine? If you can, check you're not denying packets on the xinetd machine in the FORWARD chain of IPTables

share|improve this answer
I am trying to connect to in the SSH machine and be able to access that from the xinetd machine from port 2222 since the xinetd machine also runs SSH, I would like to be able to connect to the xinetd machine on port 2222 to access – Justin Oct 10 '10 at 17:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.