Guest User

Untitled

a guest
Jun 4th, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. proxy_user="<username I need to authenticate at the proxy>"
  2. proxy_pass="<password I need to authenticate at the proxy>"
  3. proxy_serv="<hostname of the proxy>"
  4. proxy_port=<port of the proxy>
  5. ssh_user="<remote username I need to login on the ssh-machine>"
  6. ssh_serv="<remote password I need to login on the ssh-machine>"
  7. ssh_port=<ssh-port>
  8.  
  9. $ export env http_proxy="http://$proxy_user:$proxy_pass@$proxy_serv:$proxy_port"
  10.  
  11. $ wget $ssh_serv
  12. Connecting to <proxy_serv>... connected.
  13. Proxy request sent, awaiting response... 200 OK
  14. Length: unspecified [text/html]
  15. Saving to: ‘index.html’
  16.  
  17. $ ssh $ssh_user@$ssh_server:$ssh_port
  18. ssh: Could not resolve hostname <ssh_server>:<ssh_port> Temporary failure in name resolution
  19.  
  20. ssh -o "ProxyCommand='ssh -W %h:%p $proxy_user:$proxy_pass@$proxy_serv:$proxy_port'" $ssh_user@$ssh_serv:$ssh_port
  21.  
  22. Host ssh.example.com
  23. ProxyCommand ssh root@proxy.example.com nc %h %p
Add Comment
Please, Sign In to add comment