1

I'm working behind a proxy with credentials (username/password). The proxy ip is 10.302.34.02 on port 8080. My credentials are myusername / mypassword

On the remote host, ssh is configured on port 12300.

For using rsync, I installed connect-proxy, added my remote host in .ssh/config

Host toto.be
  ProxyCommand connect -H myusername@10.302.34.02:8080 %h 12300

It's working fine. I can do ssh toto.be but it asks me my proxy password. Ok, it's normal. But how can I do to store the password somewhere or to put it in the command line ?

I tried

ProxyCommand connect -H myusername:mypassword@10.302.34.02:8080 %h 12300

But it's not working. Tells me Enter proxy authentication password for myusername:mypassword@10.302.34.02

Also tried with ssh toto.be << password.file with same effect (asking me password).

What would be the solution ?

1

According to the connect manpage:

ENVIRONMENT
   SOCKS5_USER,  SOCKS5_PASSWORD,  HTTP_PROXY_USER,   HTTP_PROXY_PASSWORD,
   CONNECT_PASSWORD, LOGNAME, USER

So it looks like you could export your proxy password in the HTTP_PROXY_PASSWORD variable.

Something like:

export HTTP_PROXY_PASSWORD=mypassword

in ~/.profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.