Ssh Include Named Configuration

From NovaOrdis Knowledge Base
Revision as of 01:27, 1 August 2019 by Ovidiu (talk | contribs) (Created page with "=Internal= * OpenSSH Operations =Overview= Create .ssh/dev/example: Host example HostName 10.1.10.59 User ec2-user Port 22...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

Create .ssh/dev/example:

Host example
 HostName 10.1.10.59
 User ec2-user
 Port 22
 UserKnownHostsFile /dev/null
 StrictHostKeyChecking no
 PasswordAuthentication no
 IdentityFile /Users/ovidiu/.ssh/example-pk.pem
 IdentitiesOnly yes
 LogLevel FATAL
 ForwardAgent yes
 ProxyCommand ssh -o ExitOnForwardFailure=yes -W %h:%p -i ~/.ssh/example-pk.pem %r@1.2.3.4

Then, in ~/.ssh/config:

include dev/*


You can connect with:

ssh example