LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh server proxy (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-server-proxy-640374/)

teayourself 05-06-2008 04:29 PM

ssh server proxy
 
Im was not sure were to post this, so here i am.

The situation is like this:
PC (A) runs linux and ssh server and its behind a firewall. (privs:root)
PC (C) has direct access to the internet. (privs: root)

In the parenthesis i have written down my privs to each server.
I would like to be able to ssh to PC (A) from PC(C).
I have tried doing some ssh tunnels to be able to do that, but i had no luck. This is what i tried:

ssh -x -e none -l <username> -L 7777:<PC (A)>:22 <PC (C)>

in order to be able to do an "ssh <username@<PC (C)> -p 7777" and that would redirect me to <PC (A)>.


Is there something im doing wrong ? Is there any kind of ssh "proxy" that i could use ?


Thanks in advance and please forgive any grammar errors i've made, english is not my native language :)

unSpawn 05-06-2008 05:44 PM

The tunnel config examples in http://souptonuts.sourceforge.net/sshtips.htm could help.

beadyallen 05-06-2008 06:02 PM

You've got mixed up. The entry point to the tunnel is on the local machine, not A or C, so you want to connect with 'ssh -p 7777 user@localhost'

teayourself 05-07-2008 01:46 AM

Quote:

Originally Posted by beadyallen (Post 3145047)
You've got mixed up. The entry point to the tunnel is on the local machine, not A or C, so you want to connect with 'ssh -p 7777 user@localhost'

I do have it mixed up ^^. But that is what i was doing im afraid. I have set up the port tunnel in the mashine i would like to to shh (that is behind a firewall) to a mashine that i have access to, and then ssp -p 7777 <username>@<"mashine that i have access to"> and that didnt worked.

@unSpawn: In that example the laptop (outside mashine, or in my case PC (A), can access a mashine with ssh inside the network (PC (C)). In my case you cant do that. Im afraid i cant generallize that example to fit in my case :(

ps.: i have also tried the localhost ssh, no luck.


All times are GMT -5. The time now is 07:11 PM.