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.

At work we have several servers, but only one is SSH accessible outside of our local network. If I am working from home, I use PuTTY to connect to the one that is accessible, then SSH in to whatever server I want to work on.

Is there a way to automate this process? I see there are options for 'tunnels' and for a 'proxy', but neither of these seem to quite match what I'm trying to do.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Yes, In the options under Connection -> SSH. There is "Remote command:" just put in 'ssh server' or whatever string you want. The only downside to this is if you 'exit' the 2nd terminal it will auto kill the first one as well.

putty setup

share|improve this answer

I know it's an old question, but I think it's still useful to add an alternative.

In addition to the accepted answer, which uses SSH on the remote side as a proxy, you can also use plink (you can get it on the offical Putty site) as a local proxy.

In the options under Connection > Proxy you select 'Local' as the proxy type and as local proxy command you enter plink "«session name»" -agent -nc %host:%port. Replace «session name» by the name of the Putty session you want to use as a proxy.

The reason I did it this way, is that I need a specific proxy for a lot of sessions. Using this solution I can easily change the settings of the proxy server in one place.

Putty Proxy Settings

(I think you need a full path to plink if the program folder is not in your PATH)

Please note that the approach is a little different from the accepted answer. Using my solution, you need to enter the final host name (the protected server you want to log in to) in the session settings. Using the accepted answer you'll enter the proxy server as the host name of the session.

share|improve this answer

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.