Skip to content

Commit

Permalink
config: shell: add aliases for typical ssh, scp and sftp configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
herbetom committed Sep 27, 2023
1 parent 242b1f8 commit 250ec5d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@
User root
'';

environment.shellAliases = {
ssh_force_password = "ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no";
scp_force_password = "scp -o PreferredAuthentications=password -o PubkeyAuthentication=no";
sftp_force_password = "sftp -o PreferredAuthentications=password -o PubkeyAuthentication=no";
ssh_stupid = "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
scp_stupid = "scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
ssh_rsa = "ssh -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa'";
scp_rsa = "scp -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa'";
ssh_rsa_stupid = "ssh -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
scp_rsa_stupid = "scp -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
ssh_old = "ssh -o 'KexAlgorithms diffie-hellman-group1-sha1' -o 'HostKeyAlgorithms +ssh-dss' -o 'Ciphers aes128-cbc,3des-cbc'";
ssh_old_stupid = "ssh -o 'KexAlgorithms diffie-hellman-group1-sha1' -o 'HostKeyAlgorithms +ssh-dss' -o 'Ciphers aes128-cbc,3des-cbc' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
scp_old_stupid = "scp -o 'KexAlgorithms diffie-hellman-group1-sha1' -o 'HostKeyAlgorithms +ssh-dss' -o 'Ciphers aes128-cbc,3des-cbc' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
};

systemd.network = {
networks = {
"99-default" = {
Expand Down

0 comments on commit 250ec5d

Please sign in to comment.