From 2639394d7b72032e4e90680d19b8d8fdc70b5d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=20Gei=C3=9Fler?= Date: Wed, 16 Oct 2024 14:28:22 +0200 Subject: [PATCH] ~/.ssh/config als config datei --- 1 Minitools/config | 154 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 1 Minitools/config diff --git a/1 Minitools/config b/1 Minitools/config new file mode 100644 index 0000000..0f087f8 --- /dev/null +++ b/1 Minitools/config @@ -0,0 +1,154 @@ +### +### Version vom 16. Oktober 2024 (1) +### +# XY_hostname +# +# X is user +# a admin +# A andre +# c conetadm +# g andregeissler +# n ansible +# r root +# +# Y is network +# l LAN +# t Tailscale +# v VPN +# +# .ts als Suffix bei diversen Hosts für Verbindungen via tailscale +# + +# read config from bottom up +# that means higher options overwrites lower ones + +Host jj + HostKeyAlias jj + User conetadm + Hostname 10.101.0.11 +Host jjj + HostKeyAlias jjj + User conetadm + Hostname 10.1.1.5 + +Host ?l_jjj + HostKeyAlias jjj + Hostname 10.1.1.5 +Host ?t_jjj.* + HostKeyAlias jjj + Hostname conlxjh01.ts + +Host ?l_mc + HostKeyAlias mc + Hostname 195.20.133.87 +Host ?t_mc.* + HostKeyAlias mc + Hostname conlxmc01.ts + +Host ?l_server + HostKeyAlias server + Hostname 192.168.100.5 +Host ?t_server.* + HostKeyAlias server + Hostname server.ts + +Host ?l_tux + HostKeyAlias tux + Hostname 192.168.100.100 +Host ?t_tux.* + HostKeyAlias tux + Hostname tux.ts + +Host ?l_nas + HostKeyAlias nas + Hostname 192.168.100.250 +Host ?t_nas.* + HostKeyAlias nas + Hostname synology.ts + +Host vesta + User root +Host ?l_vesta vesta + HostKeyAlias vesta + Hostname vesta.agserver.de + Port 2222 + +Host supnas01 + ProxyCommand ssh -qW %h:%p conlxxontro02 + User sftp + HostKeyAlgorithms +ssh-rsa +Host conlxxontro02 conlxcert02 declx* + User conetadm +Host vesta.hosting-ffm.de + User conetadm + ProxyCommand ssh -qW %h:%p jj + +Host *.ts + ProxyCommand none + +Host *.conet-services.de + User ansible + ProxyCommand ssh -qW %h:%p jj + +Host conlx* conmail* + HostName %h + Port 22 + User ansible + IdentityFile ~/.ssh/ansible_id_rsa + HostKeyAlgorithms +ssh-rsa + UserKnownHostsFile /dev/null + ProxyCommand ssh -qW %h:%p jj + + +Host switch-admin-* +## Zeile notwendig wenn in Admin Umgebung +# ProxyCommand none +## In Finance Umgebung muss Proxy 'jj' genutzt werden +# ProxyCommand ssh -qW %h:%p jj +## ssh admin:HOSTNAME@switch-admin-con<1|2> +## 1. Login auf Avocent admin/avocent +## Verbindung auf Konsole dort +## 2. Login auf Gerät ageissler/ + +Host switch-* router-* asa-* + HostName %h + Port 22 + User ageissler + PreferredAuthentications keyboard-interactive,password + KbdInteractiveAuthentication yes + PasswordAuthentication yes + Ciphers aes128-cbc,aes256-cbc,aes192-ctr + KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 + HostKeyAlgorithms +ssh-rsa + StrictHostKeyChecking no + ForwardX11 no + ProxyCommand ssh -qW %h:%p jj + +# set username +Host a?_* + User admin +Host A?_* + User andre +Host c?_* + User conetadm +Host g?_* + User andregeissler +Host r?_* + User root +Host n?_* + User ansible + +# set general settings +Host * + User andre + PreferredAuthentications publickey,keyboard-interactive,password + StrictHostKeyChecking no + HashKnownHosts no + #UserKnownHostsFile /dev/null + IdentityFile ~/.ssh/id_ed25519 + IdentityFile ~/.ssh/ansible_id_rsa + CheckHostIP no + ForwardX11 yes + NoHostAuthenticationForLocalhost yes + +