Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm trying to find out what the equivalent Mac SSH client is and set of commands are that would achieve the below. In Windows we use the Putty CLI utility 'Plink' to set up a SSH connection to a SSH server for web proxying purposes.

plink -l username -pw password -D 8080 -P 443 -ssh 1.2.3.4

This command establishes a SSH connection to host IP: 1.2.3.4 over port 443 using the username and password specified. It then presents a local port (8080) available for other applications on the local host to connect to, for example a web browser. Within the web browser we configure a SOCKS proxy using our own IP address or 'localhost' as the proxy server, with port 8080.

I don't know enough about Mac to replicate this putty tool's function and it's not a standard ssh client and I haven't seen plink documented to map things to a unix situation.

share|improve this question
1  
ssh is the tool of choice for this –  patrix Dec 1 '12 at 15:00

1 Answer 1

This is standard ssh and covered in the man page for TCP forwarding.

ssh -f -L 8080:localhost:443 1.2.3.4 sleep 10

I changed as little from the manual page (8080, 443, 1.2.3.4) so you can find it and the explanation there on OS X. You will want to increase the sleep time if you browser isn't going to connect in the next 10 seconds.

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.