fix: error in ssh config

This commit is contained in:
ryan4yin
2023-05-25 23:51:33 +08:00
parent 7c7591e167
commit 5503e7bac0
2 changed files with 8 additions and 10 deletions

View File

@@ -10,13 +10,13 @@
# all my ssh private key are generated by `ssh-keygen -t ed25519 -C "ryan@nickname"`
# the config's format:
# Host — the nickname youll use for the host.
# HostName — the IP address or domain of the remote server.
# User — the username associated with the remote account.
# Host — given the pattern used to match against the host name given on the command line.
# HostName — specify nickname or abbreviation for host
# IdentityFile — the location of your SSH key authentication file for the account.
# format in details:
# https://www.ssh.com/academy/ssh/config
extraConfig = ''
Host Homelab
Hostname 192.168.*
Host 192.168.*
# allow to securely use local SSH agent to authenticate on the remote machine.
# It has the same effect as adding cli option `ssh -A user@host`
ForwardAgent yes
@@ -26,8 +26,7 @@
# required to prevent sending default identity files first.
IdentitiesOnly yes
Host GitHub
Hostname github.com
Host github.com
# github is controlled by gluttony~
IdentityFile ~/.ssh/gluttony
# Specifies that ssh should only use the identity file explicitly configured above
@@ -38,6 +37,7 @@
# use ssh-agent so we only need to input passphrase once
# run `ssh-add /path/to/key` for every identity file
# check imported keys by `ssh-add -l`
# TODO `ssh-add` can only add keys temporary, use gnome-keyring to unlock all keys after login.
};
programs.git = {