Skip to content

Commit b5bb7bd

Browse files
committed
Dotfiles
1 parent 240e46a commit b5bb7bd

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

ssh_config

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -----------------------------------------------------------------------------
2+
# Matjaž's dotfiles SSH client configuration file
3+
#
4+
# Copyright (c) 2015-2016, Matjaž Guštin <[email protected]> matjaz.it
5+
# This source code form is part of the "Matjaž's dotfiles" project and is
6+
# subject to the terms of the BSD 3-clause license as expressed in the
7+
# LICENSE.md file found in the top-level directory of this distribution and at
8+
# http://directory.fsf.org/wiki/License:BSD_3Clause
9+
# -----------------------------------------------------------------------------
10+
11+
# Default configuration that any host inherits. Override if needed.
12+
Host *
13+
# Use protocol v2 only, do not fallback to v1 if v2 is not available.
14+
Protocol 2
15+
16+
### Security ###
17+
# Protocol v2 ciphers
18+
# The latest ones are really weak and are kept for compatibility with
19+
# all hosts that may not have the stronger ones. No spaces after commas!
20+
Ciphers aes256-ctr,[email protected],aes256-cbc,aes192-ctr,aes192-cbc,aes128-ctr,[email protected],aes128-cbc
21+
# Try public key first
22+
PreferredAuthentications publickey,gssapi-with-mic,hostbased,keyboard-interactive,password
23+
24+
### Connection ###
25+
# After <value> seconds of inativity, sends an echo request to the server.
26+
ServerAliveInterval 30
27+
# After <value> echo consecutive requests sent, disconnects the session.
28+
ServerAliveCountMax 20
29+
# TCP timeout when estabilishing the first connection to the server.
30+
ConnectTimeout 10
31+
# Number of times to try the connection if timeouts.
32+
ConnectionAttempts 3
33+
Compression no
34+
35+
### Local logging ###
36+
# A command run on the local machine after a succesful login to a server.
37+
# %u = local user name
38+
# %l = local host name
39+
# %r = remote user name
40+
# %n = host name as provided on the command line
41+
# %h = remote host name
42+
# %p = remote port
43+
# %d = local user's home directory
44+
PermitLocalCommand yes
45+
LocalCommand echo "$(date +%%s) %u@%l --> %r@%h:%p" >> %d/.ssh/logins.log

0 commit comments

Comments
 (0)