ethereumonarm
ethereumonarm copied to clipboard
Slow SSH logins
I noticed that SSH logins are excruciatingly slow with this Ubuntu server image.
I did some troubleshooting by passing the -vv flag to ssh to see what it was getting hung up on, and it was getting stuck on "pledge: network".
This is caused by an optional pluggable authentication module (PAM). https://serverfault.com/a/998761
Commenting out
session optional pam_systemd.so
in /etc/pam.d/common-session solves this slow SSH login issue. This might be worth adding to the rc.local via a sed command
sed -i 's|session\soptional\s\bpam_systemd.so|#session optional pam_systemd.so|g' /etc/pam.d/common-session
Sources:
- https://serverfault.com/a/998761
- https://jrs-s.net/2017/07/01/slow-ssh-logins/
Thinking out loud here, but it would be cool if you could specify an SSH public key when you generate your own custom image, and have SSH passwords disabled by default and have SSH configured so you can only login with that public key
https://www.coincashew.com/coins/overview-eth/guide-or-security-best-practices-for-a-eth2-validator-beaconchain-node#disable-ssh-password-authentication-and-use-ssh-keys-only
I will take a deeper look into this, bc in our test environment we never suffer this slowness, give my a few days to learn more about this and do further testing.