Quantcast
Viewing all articles
Browse latest Browse all 4549

Logging into SSH immediately closes the connection

So, I have searched and searched today and cannot find an answer to this issue. I am running Ubuntu 22.04 on Google Cloud. I am able to SSH into it with google cloud directly only. However, if I try and ssh into with my normal terminal, it immediately closes the connection. I tried to create a new user. I set the pass for the new user and I have went through a ton of SSH settings. I have tried with public keys (my normal) and without keys on to just make it password auth only. It still just allows me to connect, logs me in, and then immediately closes the connection on my. It is driving me nuts!

tail -f /var/log/auth.logJun 24 19:04:59 hardcore-antonelli systemd-logind[1179]: Session 25 logged out. Waiting for processes to exit.Jun 24 19:04:59 hardcore-antonelli systemd-logind[1179]: Removed session 25.Jun 24 19:06:35 hardcore-antonelli sshd[4589]: Accepted keyboard-interactive/pam for swhitlow from 73.102.224.253 port 53260 ssh2Jun 24 19:06:35 hardcore-antonelli sshd[4589]: pam_unix(sshd:session): session opened for user swhitlow(uid=10000) by (uid=0)Jun 24 19:06:35 hardcore-antonelli systemd-logind[1179]: New session 26 of user suitecrm.givemethevi_zgb50siw3bf.Jun 24 19:06:35 hardcore-antonelli sshd[4648]: Received disconnect from 73.102.224.253 port 53260:11: disconnected by userJun 24 19:06:35 hardcore-antonelli sshd[4648]: Disconnected from user <user_name_here> 73.102.224.253 port 53260Jun 24 19:06:35 hardcore-antonelli sshd[4589]: pam_unix(sshd:session): session closed for user <user_name_here>Jun 24 19:06:35 hardcore-antonelli systemd-logind[1179]: Session 26 logged out. Waiting for processes to exit.Jun 24 19:06:35 hardcore-antonelli systemd-logind[1179]: Removed session 26.Jun 24 19:07:52 hardcore-antonelli sshd[4712]: Accepted keyboard-interactive/pam for <user_name_here> from 73.102.224.253 port 53383 ssh2

I have double checked, and the port and everything is configured correctly with our google cloud. I have isolated it to just a ubuntu/ssh issue. Since it allows me to connect and just drops the connection I really don't know how to solve this. I'm new with linux so go easy on me please. :)

Here is the /etc/ssh/sshd_config file:

# This is the sshd server system-wide configuration file.  See# sshd_config(5) for more information.# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games# The strategy used for options in the default sshd_config shipped with# OpenSSH is to specify options with their default value where# possible, but leave them commented.  Uncommented options override the# default value.Include /etc/ssh/sshd_config.d/*.conf#Port 22#AddressFamily any#ListenAddress 0.0.0.0#ListenAddress ::#HostKey /etc/ssh/ssh_host_rsa_key#HostKey /etc/ssh/ssh_host_ecdsa_key#HostKey /etc/ssh/ssh_host_ed25519_key# Ciphers and keying#RekeyLimit default none# Logging#SyslogFacility AUTH#LogLevel INFO# Authentication:#LoginGraceTime 32m#PermitRootLogin prohibit-password#StrictModes yes#MaxAuthTries 6#MaxSessions 10#PubkeyAuthentication yes# Expect .ssh/authorized_keys2 to be disregarded by default in future.#AuthorizedKeysFile     .ssh/authorized_keys .ssh/authorized_keys2#AuthorizedPrincipalsFile none#AuthorizedKeysCommand none#AuthorizedKeysCommandUser nobody# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts#HostbasedAuthentication no# Change to yes if you don't trust ~/.ssh/known_hosts for# HostbasedAuthentication#IgnoreUserKnownHosts no# Don't read the user's ~/.rhosts and ~/.shosts files#IgnoreRhosts yes# To disable tunneled clear text passwords, change to no here!#PasswordAuthentication yes#PermitEmptyPasswords no# Change to yes to enable challenge-response passwords (beware issues with# some PAM modules and threads)KbdInteractiveAuthentication yes# Kerberos options#KerberosAuthentication no#KerberosOrLocalPasswd yes#KerberosTicketCleanup yes#KerberosGetAFSToken no# GSSAPI options#GSSAPIAuthentication no#GSSAPICleanupCredentials yes#GSSAPIStrictAcceptorCheck yes#GSSAPIKeyExchange no# Set this to 'yes' to enable PAM authentication, account processing,# and session processing. If this is enabled, PAM authentication will# be allowed through the KbdInteractiveAuthentication and# PasswordAuthentication.  Depending on your PAM configuration,# PAM authentication via KbdInteractiveAuthentication may bypass# the setting of "PermitRootLogin without-password".# If you just want the PAM account and session checks to run without# PAM authentication, then enable this but set PasswordAuthentication# and KbdInteractiveAuthentication to 'no'.UsePAM yes#AllowAgentForwarding yes#AllowTcpForwarding yes#GatewayPorts noX11Forwarding yes#X11DisplayOffset 10#X11UseLocalhost yes#PermitTTY yesPrintMotd no#PrintLastLog yes#TCPKeepAlive yes#PermitUserEnvironment no#Compression delayedClientAliveInterval 60#ClientAliveCountMax 3#UseDNS no#PidFile /run/sshd.pid#MaxStartups 10:30:100PermitTunnel no#ChrootDirectory none#VersionAddendum none# no default banner path#Banner none# Allow client to pass locale environment variablesAcceptEnv LANG LC_*# override default of no subsystemsSubsystem       sftp    /usr/lib/openssh/sftp-server# Example of overriding settings on a per-user basis#Match User anoncvs#       X11Forwarding no#       AllowTcpForwarding no#       PermitTTY no#       ForceCommand cvs serverPasswordAuthentication yesAllowUsers <user_name_here>

Viewing all articles
Browse latest Browse all 4549

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>