blob: d5cebfc003ac84effa2b640976e00e378d659c56 (
plain)
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
|
# SSH client config
# General config for all hosts
Host *
# No idea why I should wait full 30 seconds for a peer to reply ...
ConnectTimeout 5
# Prevents hung-up sessions. I guess a firewall dropped the connection as
# no packages were thransferred for longer time (eg half a hour). This
# setting sends some ping-like packets after some time which helps
# firewalls to recognize the connection as alive.
ServerAliveInterval 107
# Makes bash autocomplete the hostname :)
Host example.com
Hostname example.com
# Use non-default user/port/whatever for listed hosts
Host 42.42.42.42 example.com
User myUsernameOnRemote
Port 12345
# Get rid of annoying security checks where it doesn't make sense (eg
# throw-away VirtualBox machines).
Host 192.168.56.*
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
# Run few setup cmds before starting a shell.
Host example.com
RequestTTY yes
RemoteCommand echo foo bar && exec /usr/bin/bash -i
Host example.com
# Strongest way I found so far to force remote prompt:
RemoteCommand export PROMPT_COMMAND='export PS1='"'"'my-prompt\n\$ '"'"'' && exec /usr/bin/bash -li
|