Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow SSH logins #12

Open
luisnaranjo733 opened this issue Jun 30, 2021 · 2 comments
Open

Slow SSH logins #12

luisnaranjo733 opened this issue Jun 30, 2021 · 2 comments

Comments

@luisnaranjo733
Copy link

luisnaranjo733 commented Jun 30, 2021

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:

@luisnaranjo733
Copy link
Author

luisnaranjo733 commented Jun 30, 2021

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

@washosk
Copy link
Collaborator

washosk commented Jul 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants