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

can only ssh into instance once or in first few minutes after boot #2

Open
robert-osborne opened this issue Jan 15, 2013 · 3 comments

Comments

@robert-osborne
Copy link

I'm having this weird problem were I get locked out of the instance after a few minutes with:

Permission denied (publickey).

This happens with either password or keys configured. This looks like exactly the setup I need but ssh going away is a deal breaker :-)

@nigma
Copy link
Owner

nigma commented Jan 15, 2013

This is strange. Do you receive any monit alerts or email messages with logcheck error reports (scan is performed every full hour)?

You should be able to obtain emergency access to the instance using Remote Access/Ajax Console from the Linode admin panel. Are there any entries in the following locations that may indicate a problem?

  • /var/log/auth.log
  • /var/log/fail2ban.log
  • /root/stackscript.log

@robert-osborne
Copy link
Author

I agree, very strange. Once I'm locked out I can't get in via the console either.

I checked your code; clean and nothing odd that I can see. I can give it one more shot and see if I can stay logged in and see what to those files.

@robert-osborne
Copy link
Author

Ok. I think I see what is happening. The user ssh registration stuff is happening 10 or more minutes after the boot "finishes" according to Linode. If I wait until that time (ie. until I get the event notification) then sshd gets restarted and I can login with my ssh key. What might be happening is that logging in via password or lish console before that time frame can cause "bad things" to happen.

Is it possible to run the ssh configuration first thing in the process? This might reduce the race condition.

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