]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - ssh_config
setup.sh: Use sed_i().
[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 # Use only authentication identity files configured in ~/.ssh/config even if
52 # ssh-agent offers more identities.
53     IdentitiesOnly yes
54
55 # Bind local forwardings to loopback only. This way no remote hosts can access
56 # them (default).
57     GatewayPorts no
58 # Abort if not all requested port forwardings can be set up.
59     ExitOnForwardFailure yes
60
61 # Allow using -M (ControlMaster) to create a master SSH session which
62 # "tunnels" other connections to the same host, thus reducing the number of
63 # authentications (which are relatively slow) and TCP connections. The master
64 # sockets are stored in ~/.ssh (by default ControlPath is not set).
65     ControlPath ~/.ssh/master-%l-%h-%p-%r
66 # Automatically create a new master session if there's none yet or use an
67 # existing one. This way the user doesn't have to use -M to enable a master
68 # manually. Don't set this option to "yes" or all SSH commands try to become
69 # the master session which is obviously not possible.
70     ControlMaster auto
71
72 # Hash hosts in ~/.ssh/known_hosts to try to conceal the known hosts. Doesn't
73 # help if the ssh hosts are stored in the shell's history file or in this file
74 # as shortcut.
75     HashKnownHosts yes
76
77 # Don't permit running local commands (default).
78     PermitLocalCommand no
79
80 # Don't send any environment variables (default).
81     SendEnv
82
83 # Check host IP in known_hosts when connecting to detect DNS spoofing
84 # (default).
85     CheckHostIP yes
86 # Ask before adding any host keys to ~/.ssh/known_hosts (default).
87     StrictHostKeyChecking ask