-
Notifications
You must be signed in to change notification settings - Fork 0
ssh
Xuwei Li edited this page Jan 29, 2022
·
7 revisions
% ssh -i <key location> login@server.example.com ~/.ssh/config
Host myshortname realname.example.com
HostName realname.example.com
IdentityFile ~/.ssh/realname_rsa # private key for realname
User remoteusername
Host myother realname2.example.org
HostName realname2.example.org
IdentityFile ~/.ssh/realname2_rsa # different private key for realname2
User remoteusername
Host custom-host-name
HostName <IP Address>
Port 22
User <Username>
IdentityFile ~/.ssh/<Path to the private key>
IdentitiesOnly yes
TCPKeepAlive yes~/.ssh/config on Client
Host *
ServerAliveInterval 100
/etc/ssh/sshd_config on Server
TCPKeepAlive yes
...
ClientAliveInterval 60
ClientAliveCountMax 10000