]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - ssh_config
ssh_config: Use ControlMaster auto.
[config/dotfiles.git] / ssh_config
1 # SSH configuration file.
2 #
3 # Some options are set even if they are default to prevent /etc/ssh/ssh_config
4 # from overwriting them.
5
6 # Copyright (C) 2011-2013  Simon Ruderich
7 #
8 # This file is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This file is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
20
21 # Undocumented (and not very well tested) feature. This drops the connection
22 # after 5 seconds of inactivity. Thanks to shad0VV in #openssh on Freenode
23 # (2012-11-04 18:40 CET) for telling me about this undocumented feature.
24 #
25 #     ServerAliveCountMax 0
26 #     ServerAliveInterval 5
27
28
29 # Rules for all hosts.
30 Host *
31
32 # Force protocol version 2 which is more secure (default).
33     Protocol 2
34
35 # Disable X11 and agent forwarding for security reasons (defaults).
36     ForwardX11 no
37     ForwardAgent no
38 # Don't trust remote X11 clients. If enabled allows bad admins complete access
39 # to local X11!
40     ForwardX11Trusted no
41
42 # Disable authentication methods I don't use.
43     ChallengeResponseAuthentication no
44     GSSAPIAuthentication no
45     HostbasedAuthentication no
46     KbdInteractiveAuthentication no
47 # Only enable those I need.
48     PasswordAuthentication yes
49     PubkeyAuthentication yes
50
51 # Abort if not all requested port forwardings can be set up.
52     ExitOnForwardFailure yes
53
54 # Allow using -M (ControlMaster) to create a master SSH session which
55 # "tunnels" other connections to the same host, thus reducing the number of
56 # authentications (which are relatively slow) and TCP connections. The master
57 # sockets are stored in ~/.ssh (by default ControlPath is not set).
58     ControlPath ~/.ssh/master-%l-%h-%p-%r
59 # Automatically create a new master session if there's none yet or use an
60 # existing one. This way the user doesn't have to use -M to enable a master
61 # manually. Don't set this option to "yes" or all SSH commands try to become
62 # the master session which is obviously not possible.
63     ControlMaster auto
64
65 # Hash hosts in ~/.ssh/known_hosts to try to conceal the known hosts. Doesn't
66 # help if the ssh hosts are stored in the shell's history file or in this file
67 # as shortcut.
68     HashKnownHosts yes
69
70 # Don't permit running local commands (default).
71     PermitLocalCommand no
72
73 # Don't send any environment variables (default).
74     SendEnv
75
76 # Check host IP in known_hosts when connecting to detect DNS spoofing
77 # (default).
78     CheckHostIP yes
79 # Ask before adding any host keys to ~/.ssh/known_hosts (default).
80     StrictHostKeyChecking ask