Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 = 10.10.10.10 22
}

And the Terminal output on my Mac:

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

Any ideas?

Thanks :)

share|improve this question

1 Answer 1

Can you connect to 10.10.10.10:2222 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 10.10.10.10:22 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 10.10.10.10:22 –  Justin Oct 10 '10 at 17:49

Your Answer

 
discard

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.