Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


I ban my server from getting to my other VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

I ban my server from getting to my other VPS

Hi everyone, every time I tried to login (or use scp) into my server
I got this error message
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Apparently this message due me whitelist IPs that can login my server log time ago, but I could not find how that happened...
I checked /etc/hosts.deny file and nothing there

and this VPS log:-
sshd[124]: Connection closed by authenticating user root 1.2.1.1 port 99998 [preauth]
I suspect this is mostly iptables issue

iptables -L INPUT -v
# Warning: iptables-legacy tables present, use iptables-legacy to see them

I can't see current rules guess due to (iptables being upgraded) and not displaying legacy rules?

Comments

  • I don't think a "permission denied" has something to do with iptables.

    PAM & crap perhaps?

  • yoursunnyyoursunny Member, IPv6 Advocate
    edited August 2023

    "Permission denied" means:

    • wrong username
    • public key not in authorized_keys
    • wrong file permission of authorized_keys
  • babywhalebabywhale Member
    edited August 2023

    if you suspect it's from your hosts.deny file then if it's available i would try to use VNC on whatever vps provider your with. other then that your kinda screwed

  • HalfEatenPieHalfEatenPie Veteran
    edited August 2023

    @JustPfff said:
    Hi everyone, every time I tried to login (or use scp) into my server
    I got this error message
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

    Apparently this message due me whitelist IPs that can login my server log time ago, but I could not find how that happened...
    I checked /etc/hosts.deny file and nothing there

    and this VPS log:-
    sshd[124]: Connection closed by authenticating user root 1.2.1.1 port 99998 [preauth]
    I suspect this is mostly iptables issue

    iptables -L INPUT -v
    # Warning: iptables-legacy tables present, use iptables-legacy to see them
    

    I can't see current rules guess due to (iptables being upgraded) and not displaying legacy rules?

    Permission denied means it's not iptables but rather the ssh daemon.

    You're getting rejected at the front door. This is the software not letting you in. This isn't iptables. You can still get on the road to get to the front door. IPTables would have prevented you from turning on the street to get to the front door.

  • JustPfffJustPfff Member
    edited September 2023

    @yoursunny said: public key not in authorized_keys

    its public key I added to log in automatically from my laptop to that VPS, but I thought I could still use user login from other device

    Alright I solve it by enabling password login in sshd_config file

    PasswordAuthentication yes

Sign In or Register to comment.