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