Unable to connect after Ubuntu upgrade

1

I upgraded from Ubuntu 18.04 to Ubuntu 20.04 and everything was normal. When I upgraded from Ubuntu 20.04 to Ubuntu22.04 again, winscp and putty could not connect, and errors were reported, "The host cannot communicate for more than 15 seconds" and "Terminated by user". But I can connect in the aws console

I also upgraded other machines from Ubuntu18.04 to Ubuntu22.04, but this problem did not occur. I always used the key to log in. The user password was not set in the real environment. I thought if the user login password was not set in the real environment, how should I log in from aws? Console connected to machine

auth.log Oct 20 07:49:14 ip-172-1-6-4 sshd[134834]: message repeated 125025 times: [ error: ppoll: Invalid argument] Oct 20 07:49:14 ip-172-1-6-4 sshd[134834]: error: ppoll: Invalid argument Oct 20 07:49:14 ip-172-1-6-4 sshd[134834]: message repeated 48 times: [ error: ppoll: Invalid argument] Oct 20 07:49:14 ip-172-1-6-4 CRON[186545]: pam_unix(cron:session): session closed for user root Oct 20 07:49:14 ip-172-1-6-4 sshd[134834]: error: ppoll: Invalid argument Oct 20 07:49:36 ip-172-1-6-4 sshd[134834]: message repeated 1382065 times: [ error: ppoll: Invalid argument] Oct 20 07:49:36 ip-172-1-6-4 sudo: pam_unix(sudo:session): session closed for user root Oct 20 07:49:36 ip-172-1-6-4 sshd[134834]: error: ppoll: Invalid argument

DD-Boom
asked 7 months ago457 views
2 Answers
0

This may be down to the key-exchange algorithm. PuTTY and WinSCP may be using older forms of encryption which are fine with Ubuntu 18 and 20, but which Ubuntu 22 considers to be insecure and will refuse to use.

Are you running the latest versions of PuTTY and WinSCP? What about the OS of the host that you're trying to connect from, is it up-to-date or something like Windows 7 or 8?

When you say you can connect in the AWS Console, is this using Instance Connect?

profile picture
EXPERT
Steve_M
answered 7 months ago
  • I also upgraded other machines from Ubuntu18.04 to Ubuntu22.04, but this problem did not occur. I always used the key to log in. The user password was not set in the real environment. I thought if the user login password was not set in the real environment, how should I log in from aws? Console connected to machine

  • In /etc/ssh/sshd_config what is the value of MaxStartups, on this host with a problem and the other hosts which are fine?

    If it's >=1024 then you may be seeing this bug https://bugzilla.mindrot.org/show_bug.cgi?id=3410

0

OpenSSH introduced a change in version 8.9p1 related to the MaxStartups configuration item. In previous versions, MaxStartups allowed larger values (such as 4096), but in the new version, due to the switch to using the ppoll(2) system call, the maximum value of MaxStartups is limited to 1023. This is a change in OpenSSH to accommodate the new ppoll(2) behavior. Since this change may affect old configurations, it is recommended to ensure that the MaxStartups configuration item in your sshd_config file does not exceed 1023. If a larger value is set in your configuration, it should be modified to 1023 or smaller to ensure OpenSSH operates properly. You mentioned some suggestions for possible improvements, such as updating documentation, sshd -t showing errors when checking configuration, or automatically limiting MaxStartups to 1023. These suggestions can be submitted to the OpenSSH community to help improve the software's user experience and documentation accuracy. In summary, make sure your MaxStartups configuration does not exceed 1023 and adhere to OpenSSH's new behavior rules to ensure that your SSH server operates properly. If you set a larger value previously, make sure to change it accordingly in the new version.

DD-Boom
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions