Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a server with a static public ip address which I can access by ssh. This server is connected to a private network and inside this network there is another server with its private ip. Is there any way I can access this private server passing through the one wit public address?

I have been trying first to connect to the server with public addres something like

ssh user@x.x.x.x once logged in that server I type ssh userx@192.168.0.x

and I get permission denied (public key,password)

I tried generating the key and then copying it to the final destination

nevertheless nothing worked.

Connections work, usernames are correct and when loggin within the network its ok, but it doesnt work if I try to connect to a server from within the other server, any ideas? anyone? please?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

To access a server private address in this fashion or across the internet, you have to set up port forwarding for port 22 on the NAT device on the receiving side.

share|improve this answer
    
Thanks for answering, I found out what I wanted to do is called ssh tunneling and found a very easy way to do it. I found an answer here, but I cant find it anymore I will post it as soon as I find it. –  Zloy Smiertniy Mar 1 '12 at 0:12
    
Excellent. We use an SSL VPN solution for that here since we're tunneling all traffic between our subnets, but it's quite useful in more limited applications. –  Magellan Mar 1 '12 at 0:41
add comment

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.