You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
3.5 KiB

  1. # ssh(1) obtains configuration data from the following sources in the following order:
  2. #
  3. # 1. command-line options
  4. # 2. user's configuration file (~/.ssh/config)
  5. # 3. system-wide configuration file (/etc/ssh/ssh_config)
  6. #
  7. # For each parameter, the first obtained value will be used. The configuration files contain sections separated
  8. # by “Host” specifications, and that section is only applied for hosts that match one of the patterns given in the
  9. # specification. The matched host name is the one given on the command line.
  10. #
  11. # Since the first obtained value for each parameter is used, more host-specific declarations should be given near
  12. # the beginning of the file, and general defaults at the end.
  13. # Example for one that uses ssh keys
  14. # Without specifying IdentityFile it will use the default list
  15. Host reallysecure reallysecure.example.com
  16. HostName reallysecure.example.com
  17. User mysecureuser
  18. PreferredAuthentications publickey
  19. PasswordAuthentication no
  20. KbdInteractiveAuthentication no
  21. # This is used to rsync data over lan
  22. Host backupserver
  23. HostName 10.20.30.40
  24. User backupuser
  25. BatchMode yes
  26. Ciphers arcfour,blowfish-cbc,aes128-ctr
  27. IdentityFile ~/.ssh/backupserver.pem
  28. # Generally compression over lan slows things down
  29. Compression no
  30. # See man ssh_config for all options and descriptions, this just lists what may
  31. # be useful to do on a per-host basis. Defaults from Ubuntu 12.04
  32. Host *
  33. # Can speed up logins to some servers
  34. GSSAPIAuthentication no
  35. GSSAPIKeyExchange no
  36. ChallengeResponseAuthentication no
  37. HashKnownHosts no
  38. Protocol 2
  39. # Some servers will force log out if you haven't typed anything in a while
  40. # This means send a packet every 60 seconds, after 3 of those without a
  41. # response then drop the connection
  42. ServerAliveCountMax 3
  43. ServerAliveInterval 60
  44. TCPKeepAlive yes
  45. #BatchMode [yes|no] # Def: no
  46. #CheckHostIP [yes|no] # Def: yes - no is useful on a host who's key changes (rebuilding a dev machine)
  47. #Ciphers (see ssh_config(5)) # (sshv2) Def: (see man page) - (speed: arcfour > blowfish > aes)
  48. #Compression [yes|no] # Def: no
  49. #ControlMaster [yes|ask|auto|autoask] # Best to just google ControlMaster or check man pages
  50. #ControlPath <path>
  51. #ControlPersist [yes|no]
  52. #DynamicForward <[bind_addres:]port> # sets up a local socks proxy over ssh
  53. #ExitOnForwardFailure [yes|no] # Def: no
  54. #ForwardX11 [yes|no] # Def: no
  55. #ForwardX11Timeout (see sshd_config "Time Formats") # Def: 20 minutes
  56. #ForwardX11Trust [yes|no] # Def: yes (debian specific)
  57. #HostKeyAlias <name> # Useful if have several Host sections for single server
  58. #HostName [<dns_name>|<ip>] # Also supports %h for given on command line (eg: %h.example.com)
  59. #IdentityFile <path> # Def: (see ssh_config(5)) - several escape sequences are supported, see man page
  60. #KbdInteractiveAuthentication [yes|no] # Def: yes - can disable if only using ssh keys
  61. #LocalForward <[local bind_address:]local_port> <remote_host>:<remote_port>
  62. # An example that forwards local 8080 to port 8443 on remote server:
  63. # LocalForward localhost:8080 127.0.0.1:8443
  64. #PasswordAuthentication [yes|no] # Def: yes - Another thing to disable if using keys
  65. #Port <server_port> # Def: 22
  66. #PreferredAuthentications <list> # Can set this to 'publickey' to disable all other methods
  67. #StrictHostKeyChecking [yes|no|ask] # Def: ask
  68. #VerifyHostKeyDNS [yes|no|ask] # Def: no - useful but rarely used, google it for info