-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathssh_config.example
44 lines (32 loc) · 918 Bytes
/
ssh_config.example
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
# Simple example
Host somehost
Hostname somehost.example.com
User andrei
IdentityFile ~/.ssh/id_ed25519.pub
# Using a jump host
# i.e. easily access `target` when you have to ssh into `jumphost` first
Host target
Hostname target.example.com
User andrei
IdentityFile ~/.ssh/id_ed25519.pub
ProxyCommand ssh -q -W %h:%p jumphost
# NOTE, in newer versions of OpenSSH, you can just use
# ProxyJump jumphost
Host jumphost
Hostname jumphost.example.com
User andrei
IdentityFile ~/.ssh/id_ed25519.pub
# Git repositories
Host github.com
Hostname github.com
User git
IdentityFile ~/.ssh/id_ed25519
Host bitbucket.org
Hostname bitbucket.org
User git
IdentityFile ~/.ssh/id_ed25519
# Automatically add keys to the ssh agent so you don't have to add them
# yourself using ssh-add every time.
Host *
AddKeysToAgent yes
# vim:filetype=sshconfig