how to connect to ssh by proxy ?

Discussion in 'HOWTO-Related Questions' started by qwe010, Feb 24, 2008.

  1. qwe010

    qwe010 New Member

    hello

    i have server i install on it squid

    i browse the internet by enter this proxy

    localhost
    8080

    how i can connect to another server with this proxy in linux ?

    in windows we use putty but in linux ?
     
  2. topdog

    topdog HowtoForge Supporter

    ssh is the putty equivalent on linux
     
  3. qwe010

    qwe010 New Member

    but how ? what the right command ?
     
  4. topdog

    topdog HowtoForge Supporter

    What exactly do you do in putty that you want to be able to do on linux ?

    Because a normal ssh connection is just
    Code:
    ssh <hostname>
    
     
  5. Leszek

    Leszek New Member

    If the ssh server runs on a different port than 22 then You can connect by entering:
    Code:
     ssh -p 222 user @ domain.pl 
    where "222" is the port number.
     
  6. qwe010

    qwe010 New Member

  7. topdog

    topdog HowtoForge Supporter

    Okay you are talking about port forwarding this is how you do it
    Code:
    ssh -L 3128 localhost:3128 <ip_address_of_squid>
    
    Or add this to your .ssh/config
    Code:
    Host squid_server
    Hostname <squid_ip>
    Localforward 3128 localhost:3128
    
    Then ssh squid_server

    Then configure your web browser to use proxy 127.0.0.1 port 3128
     
  8. qwe010

    qwe010 New Member

    thanks topdog

    but after that how i can connect to another server with ( squid server ip )

    do i must do that from same terminal ?
     
  9. topdog

    topdog HowtoForge Supporter

    You can connect from a different terminal if you want if the port is already forwarded ssh will ignore the forward.
     

Share This Page