parent
b0d04606f0
commit
939e25c0b8
@ -0,0 +1,26 @@ |
||||
Host * |
||||
# Specifies whether keys should be automatically added to a running |
||||
# ssh-agent(1). If this option is set to yes and a key is loaded from a file, |
||||
# the key and its passphrase are added to the agent with the default lifetime, |
||||
# as if by ssh-add(1). |
||||
AddKeysToAgent yes |
||||
|
||||
# Requests compression of all data |
||||
Compression yes |
||||
|
||||
# Sets a timeout interval in seconds after which if no data has been received |
||||
# from the server, ssh(1) will send a message through the encrypted channel to |
||||
# request a response from the server. The default is 0, indicating that these |
||||
# messages will not be sent to the server. |
||||
ServerAliveInterval 300 |
||||
|
||||
# Reuse SSH connection to speed up remote login process using multiplexing. |
||||
ControlPath /tmp/ssh-control-%C |
||||
ControlPersist 5s |
||||
ControlMaster auto |
||||
|
||||
# Load user scripts and functions if existing. Order is important. |
||||
# |
||||
# Troubleshooting: |
||||
# ssh -vT git@github.com |
||||
Include config.d/* |
@ -0,0 +1,12 @@ |
||||
#!/usr/bin/env bash |
||||
set -e |
||||
|
||||
# set 0600 permissions on config file |
||||
# (setting permissions on a symlink does nothing; see chmod(1)) |
||||
chmod 0600 "$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )/src/.ssh/config" |
||||
|
||||
# prompt to create key if none exists |
||||
if [[ "$(find ~/.ssh -maxdepth 1 -type f -name '*.pub' | wc -l)" == 0 ]]; then |
||||
echo 'No SSH keys found; creating one now.' |
||||
ssh-keygen -t ed25519 -C 'nightfirecat@nightfirec.at' |
||||
fi |
Loading…
Reference in new issue