0

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 [email protected] once logged in that server I type ssh [email protected]

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?

1 Answer 1

2

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.

2
  • 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. Commented Mar 1, 2012 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
    Commented Mar 1, 2012 at 0:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .