[Tutor] ssh socks proxy
Adam Gold
adamgold at lavabit.com
Thu May 17 12:19:10 CEST 2012
Many thanks Kushal (it's always the silly things one has to look for!). The answer to your question is I don't have shell access to the proxy server, I can only access it for the purpose of setting up a socks proxy.
Btw, I'm probably pushing my luck here but any idea what the same script would look like if one used paramiko?
On 17 May 2012, at 04:01, kushal.kumaran+python at gmail.com wrote:
kushal.kumaran+python at gmail.com wrote:
> Adam Gold <adamgold at lavabit.com> wrote:
>
>> I'm trying to write a 'simple' script that will set up a socks proxy
>> over ssh and maintain the connection until manually terminated. It's
>> not possible to use key-based authentication so a password will need
> to
>> be supplied. Also, note, the user is presented with a list of servers
>> to choose from at the beginning. The actual ssh command is: 'ssh
> -vNCD
>> 23333 user at host'.
>>
>> I've been tinkering with both pexpect and paramiko but fear I'm making
>> a mountain out of a mole hill. I'm aware both have example scripts
> for
>> ssh forwarding but, to be honest, they are both too complicated (aka I
>> don't know how to customise them). Here is one script I've attempted
>> to get working and the associated error listing:
>>
>> http://pastebin.com/jj8Fgvwm - script
>> http://pastebin.com/jRA8zpzi - error
>>
>> Could anyone help me either correct the script I've started or suggest
>> an ockham's-razor-adherent alternative! Many thanks.
>
> The error message indicates that there hostname HOST could not be
> resolved. You need to replace that with the value of the variable HOST.
>
> COMMAND = "ssh -vNDR 23333 {}@{}".format(USER, HOST)
>
> I'm curious to know why you can't use keys. They make things much
> simpler.
Excuse the incorrect ssh command. New mail client tripped me up.
--
regards,
kushal
____________________________________________________________________________________
Use the link below to report this message as spam.
https://lavabit.com/apps/teacher?sig=3087369&key=478586400
____________________________________________________________________________________
More information about the Tutor
mailing list