You are not logged in.

#1 2020-08-16 16:01:31

Arch59
Member
Registered: 2020-08-04
Posts: 19

[SOLVED] ssh port 22 connexion root : Permission denied, please ...

Hello


i have installed ssh
> ssh -V
OpenSSH_8.3P1, OpenSSL1.1.1g

doing this shell

iptables -F ; iptables -X


iptables -t filter -A INPUT -p TCP --dport 22 -j ACCEPT
iptables -t filter -A OUTPUT -p TCP --sport 22 -j ACCEPT


iptables -t filter -A INPUT -j DROP
iptables -t filter -A OUTPUT -j DROP

iptables -L

but from windows with powershell i cannot log in archlinux via

> ssh root@192.168.0.22 -p 22
root@192.168.0.22's password:
Permission denied, please try again.

(192.168.0.22 is my static ip)

Last edited by Arch59 (2020-08-17 08:41:24)

Offline

#2 2020-08-16 16:02:55

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] ssh port 22 connexion root : Permission denied, please ...

You appear to be able to connect, so you are likely typing the password incorrectly.  I recommend you switch to ssh-keys and disable pw authentication all together.  See the wiki.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2020-08-16 16:12:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED] ssh port 22 connexion root : Permission denied, please ...

How have you configured sshd?  The default configs will not allow root login with a password.

Also please edit your first post to give this thread a title that actually represents your problem / question.

Last edited by Trilby (2020-08-16 16:38:52)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2020-08-16 16:14:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] ssh port 22 connexion root : Permission denied, please ...

Trilby wrote:

How have you configured sshd?  The default configs will not allow root login with a password.

Yes, that.  I have been playing around with ARM devices that have root ssh enabled recently and forgot.  That is likely your problem.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2020-08-16 16:54:03

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] ssh port 22 connexion root : Permission denied, please ...

OP doesn't read documentation. They relied on YouTube videos for their install. Then tried to lie about it.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2020-08-16 18:50:55

Arch59
Member
Registered: 2020-08-04
Posts: 19

Re: [SOLVED] ssh port 22 connexion root : Permission denied, please ...

Trilby wrote:

How have you configured sshd?  The default configs will not allow root login with a password.

Also please edit your first post to give this thread a title that actually represents your problem / question.

Yes, with a creation of a new user like

> useradd -m -g users -G wheel -s /bin/bash user_name (from archlinux where i want to be connected with ssh)

and doing

> ssh user_name@192.168.0.22 -p 22  (from other local computer)

or for a ssh connexion to root by adding in /etc/ssh/sshd_config

# Authentication:
PermitRootLogin yes

and doing

> ssh root@192.168.0.22 -p 22  (from other local computer)

> systemctl restart sshd

that's ok

Note : you have to be sure that sshd.service is enabled (see "systemctl start sshd")

Last edited by Arch59 (2020-08-16 19:23:07)

Offline

#7 2020-08-16 20:16:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED] ssh port 22 connexion root : Permission denied, please ...

Please use quote tags when you're quoting ... not just randomly.

If this is all working, remember to mark the thread as SOLVED.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB