Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Host mygateway-www
  2. Hostname www
  3. IdentityFile ~/.ssh/id_rsa
  4. ProxyCommand ssh mygateway nc %h 22
  5.  
  6. Host mygateway-*
  7. Hostname ???WHAT GOES HERE????
  8. IdentityFile ~/.ssh/id_rsa
  9. ProxyCommand ssh mygateway nc %h 22
  10.  
  11. Host *
  12. ServerAliveInterval 120
  13.  
  14. Host gateway.somewhere.com
  15. User jdoe
  16.  
  17. Host gateway+*
  18. User jdoe
  19. ProxyCommand ssh -T -a $(echo %h |cut -d+ -f1).somewhere.com nc $(echo %h |cut -d+ -f2) %p 2>/dev/null
  20. ControlMaster auto
  21. ControlPath ~/.ssh/ssh-control_%r@%h:%p
  22.  
  23. ssh gateway+internalhost01.somewhere.com
  24. ssh gateway+internalhost02.somewhere.com
  25.  
  26. Host *.domain
  27. IdentityFile ~/.ssh/id_rsa
  28. ProxyCommand ssh mygateway /usr/bin/nc %h 22
  29.  
  30. Host mygateway-*
  31. #Hostname ???WHAT GOES HERE????
  32. IdentityFile ~/.ssh/id_rsa
  33. ProxyCommand ssh mygateway nc $(echo %h|sed 's/^mygateway-//') %p
  34.  
  35. Host *-*
  36. # Assume LHS of "-" is GW and RHS of "-" is target host
  37. IdentityFile ~/.ssh/id_rsa
  38. ProxyCommand ssh $(echo %h|cut -d - -f1) nc $(echo %h|cut -d - -f2-) %p
  39.  
  40. Host *-*
  41. # Assume LHS of "-" is GW and RHS of "-" is target host
  42. IdentityFile ~/.ssh/id_rsa
  43. ProxyCommand ssh -W $(echo %h|cut -d - -f2-):%p $(echo %h|cut -d - -f1)
  44.  
  45. Host host1 host2 host3 hostN
  46. IdentityFile ~/.ssh/id_rsa
  47. ProxyCommand ssh mygateway nc %h %p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement