0

I have this Ubuntu 20.04 VPS which was working fine an hour back, but now I am unable to login to my sudo user. The root login is also disabled.

When it was working, I deployed a static website and wanted to install certbot ssl from sudo user, but it was getting denied that I don't have permission. After searching online I found something to change permission which is sudo chmod 755. Then it worked and my website was running, but then I got logged out and can't log back in. The password is correct and I tried this:

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no -p 4256 user@<ip>

Then it says: Permission Denied.

What is going on here? How can I fix it? I don't want to reinstall the whole server. I have everything in there. My hosting's support refused to help me as I got a self-managed one without cPanel.

Here's a Pastebin for all the output I'm getting after running ssh -v user@13.210.34.26 -p 4256

OpenSSH_8.5p1, OpenSSL 1.1.1k  25 Mar 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 13.210.34.26 [13.210.34.26] port 4256.
debug1: Connection established.
debug1: identity file /c/Users/Admin/.ssh/id_rsa type -1
debug1: identity file /c/Users/Admin/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/Admin/.ssh/id_dsa type -1
debug1: identity file /c/Users/Admin/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/Admin/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/Admin/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/Admin/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/Admin/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/Admin/.ssh/id_ed35314 type 3
debug1: identity file /c/Users/Admin/.ssh/id_ed35314-cert type -1
debug1: identity file /c/Users/Admin/.ssh/id_ed35314_sk type -1
debug1: identity file /c/Users/Admin/.ssh/id_ed35314_sk-cert type -1
debug1: identity file /c/Users/Admin/.ssh/id_xmss type -1
debug1: identity file /c/Users/Admin/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.3
debug1: compat_banner: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 13.210.34.26:4256 as 'user'
debug1: load_hostkeys: fopen /c/Users/Admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curved35314-sha256
debug1: kex: host key algorithm: ssh-ed35314
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed35314 SHA256:aZS4ZFL/olGXqpcNScSQVXFY0UlmJ4sKCSugT/1nRvC0pGOLJLXOCrA
debug1: load_hostkeys: fopen /c/Users/Admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: checking without port identifier
debug1: load_hostkeys: fopen /c/Users/Admin/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '13.210.34.26' is known and matches the ED35314 host key.
debug1: Found key in /c/Users/Admin/.ssh/known_hosts:3
debug1: found matching key w/out port
debug1: check_host_key: hostkey not known or explicitly trusted: disabling UpdateHostkeys
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /c/Users/Admin/.ssh/id_rsa
debug1: Will attempt key: /c/Users/Admin/.ssh/id_dsa
debug1: Will attempt key: /c/Users/Admin/.ssh/id_ecdsa
debug1: Will attempt key: /c/Users/Admin/.ssh/id_ecdsa_sk
debug1: Will attempt key: /c/Users/Admin/.ssh/id_ed35314 ED35314 SHA256:Ay9qo3SK2DdG9PQDKY+O3y+c54HrrjHdkCsGoM4Fyck
debug1: Will attempt key: /c/Users/Admin/.ssh/id_ed35314_sk
debug1: Will attempt key: /c/Users/Admin/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ED35314,sk-ssh-ed35314@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/Admin/.ssh/id_rsa
debug1: Trying private key: /c/Users/Admin/.ssh/id_dsa
debug1: Trying private key: /c/Users/Admin/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/Admin/.ssh/id_ecdsa_sk
debug1: Offering public key: /c/Users/Admin/.ssh/id_ed35314 ED35314 SHA256:Ay9qo3SK2DdG9PQDKY+O3y+c54HrrjHdkCsGoM4Fyck
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /c/Users/Admin/.ssh/id_ed35314_sk
debug1: Trying private key: /c/Users/Admin/.ssh/id_xmss
debug1: Next authentication method: keyboard-interactive
9
  • 3
    I changed permission of one of the directories Which one and what changes? Nov 25 at 12:39
  • @ChanganAuto I deployed a static website and wanted to install certbot ssl from sudo user. But it was getting denied that I don't have permission. So after searching online I did some sudo chmod 755 thing```. But before this I had to use some other because none was working.
    – s.khan
    Nov 25 at 12:41
  • 1
    @s.khan please edit your question with all the relevant information about what you did Nov 25 at 12:42
  • @steeldriver done. Can you guys please tell me how to fix this? I have so many apps and so many data in there.
    – s.khan
    Nov 25 at 12:44
  • You've not given specific details about what you did; nor any OS & release details. If you did what you said you did, I'd expect an error like chmod: missing operand after ‘755’ (ie. it's an incomplete command for most OSes on-topic here; the message may of course vary for your unstated release)
    – guiverc
    Nov 25 at 13:01
1

unfortunately you will have to uninstall and reinstall the entire application from scratch, so I don't know why, but I uninstalled and installed it and now it's okay

1
  • I now have access to rescue mode. But I don't know what to do here. Still trying to recover from this mess
    – s.khan
    Nov 25 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.