Advertisement
Guest User

Untitled

a guest
May 27th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. ## a list of hostnames otherwise not known to my laptop,
  2. ## i. e. not in /etc/hosts
  3. ## at home, in my local network, "ssh server" will connect me to the server
  4. Host server
  5. Host archpi
  6. Host banana
  7. Host uncle
  8. Host router
  9. Host dlna
  10. Host osmc
  11. Host vostro
  12. Host xps
  13. Host thor
  14. Host hp
  15.  
  16. ## the jump host
  17. Host jump
  18. HostName my.dynamicdns.com
  19. Port 2222
  20. IdentityFile ~/.ssh/my-jump/remote_ed25519
  21. ControlMaster auto
  22. ControlPath ~/.ssh-cm-socket/%r@%h:%p
  23. ## the forwarding rule which does not work
  24. DynamicForward 1080
  25.  
  26. ## abroad, this stanza together with the * stanza will connect me
  27. ## to the hosts above via the jump host.
  28. ## Yes, private ssh keys sit in subdirectories. %h will resolve as
  29. ## "server/remote" here, resulting in ~/.ssh/my-server/remote_ed25519;
  30. ## $(dirname %h) will simply be "server"
  31. Host */remote
  32. IdentityFile ~/.ssh/my-%h_ed25519
  33. ProxyCommand ssh -W $(dirname %h):22 jump
  34. Ciphers arcfour
  35. ClearAllForwardings yes
  36.  
  37. ## at home, in my local network, "ssh server" will connect me to the server directly.
  38. ## abroad, via public wifi, and together with the */remote stanza,
  39. ## "ssh server/remote" will connect me to the server via the jump host.
  40. ## This identity file seems to be somewhere else, but isn't. In this stanza,
  41. ## %h will be resolved as "server" to ~/.ssh/my-server/remote_ed25519
  42. Host *
  43. Compression yes
  44. CompressionLevel 1
  45. ForwardAgent yes
  46. ServerAliveInterval 60
  47. User my
  48. IdentityFile ~/.ssh/my-%h/remote_ed25519
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement