Root Login über Putty funktioniert nicht...

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
Atomic7122
Beiträge: 4
Registriert: 12.01.2018 18:33:57

Root Login über Putty funktioniert nicht...

Beitrag von Atomic7122 » 12.01.2018 18:46:00

Hallo,

ich hoffe mir kann hier jemand weiter helfen, da ich mit meinen Nerven echt am Ende bin... folgendes Problem: Ich habe mir heute meinen ersten rootServer zusammengebaut :) bei der Installation gab es au keine Probleme und die Ersten Dienste laufen auch schon. Doch jetzt mein Problem. Wenn ich versuche mich per SSH über Putty auf den Server zu verbinden kommt nur Acces denied... Das Passwort ist aber 100% richtig habe es auch schon geändert, aber ohne Erfolg. Ich habe auch in der SSHD_config die Berechtigung für den Rootzugriff auf Yes umgestellt, doch auch ohne Erfolg... Darauf habe ich einen neuen Benutzer erstellt dem ich Root rechte gegeben habe... und genau das selbe "Acces denied". Der einzige Benutzer der funktioniert ist der Aus der Installation doch dieser hat keine Rechte... Ich habe diesem zwar sudo Berechtigungen gegeben und dann funktioniert auch fast alles, doch ist das für mich nicht das gelbe vom Ei... auch eine Ftpverbindung ist damit nicht möglich.

lg Felix

schwedenmann
Beiträge: 5525
Registriert: 30.12.2004 15:31:07
Wohnort: Wegberg

Re: Root Login über Putty funktioniert nicht...

Beitrag von schwedenmann » 12.01.2018 18:49:11

Hallo


Und warum ist es ein Problem dich als normaler user einzuloggen und dann su auszuführen um dort(auf dem Server) root zu werden ?

mfg
schwedenmann

Atomic7122
Beiträge: 4
Registriert: 12.01.2018 18:33:57

Re: Root Login über Putty funktioniert nicht...

Beitrag von Atomic7122 » 12.01.2018 18:57:21

Hi,
danke für die schnelle Antwort.

Ich finde das mit dem andauerndem Passwort eingeben sehr stressig.... außerdem verstehe ich dann immer noch nicht warum der Root Zugang abgelehnt wird... Und auch eine großes Problem: mit dem normalen User kann ich kein FTP über ssh verwenden..

lg Felix

DeletedUserReAsG

Re: Root Login über Putty funktioniert nicht...

Beitrag von DeletedUserReAsG » 12.01.2018 19:08:24

Statt der hübschen Umschreibungen wären die genaue Fehlermeldung (ggf. aus den Logs) und die derzeitige sshd.conf sinnvoller gewesen. Apropos sinnvoll: wenn du dich schon als Root einloggen können musst, wär’s absolut sinnvoll, den Login ausschließlich mit einem Schlüssel zuzulassen.
Und auch eine großes Problem: mit dem normalen User kann ich kein FTP über ssh verwenden..
Was sollte dagegensprechen? Ich nutze nur SFTP zum Hochschieben/Runterladen von Dateien. Als User. Sollte es um FTPS gehen: von FTP sollte Root sowieso unter allen Umständen ferngehalten werden.

Atomic7122
Beiträge: 4
Registriert: 12.01.2018 18:33:57

Re: Root Login über Putty funktioniert nicht...

Beitrag von Atomic7122 » 12.01.2018 19:24:53

Hallo,

hier die Dateien:
SSHD_config


# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# 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.

#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 2m
#PermitRootLogin yes
#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# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# 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.

#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 2m
#PermitRootLogin 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)
ChallengeResponseAuthentication no
# 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 ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication 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 ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation sandbox
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# PermitTTY no
# ForceCommand cvs server


auth.log


Jan 12 17:46:16 root systemd-logind[430]: Watching system buttons on /dev/input/event3 (Power Button)
Jan 12 17:46:16 root systemd-logind[430]: Watching system buttons on /dev/input/event2 (Power Button)
Jan 12 17:46:16 root systemd-logind[430]: New seat seat0.
Jan 12 17:46:21 root login[433]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Jan 12 17:46:21 root systemd-logind[430]: New session 1 of user root.
Jan 12 17:46:21 root systemd: pam_unix(systemd-user:session): session opened for user root by (uid=0)
Jan 12 17:46:21 root login[480]: ROOT LOGIN on '/dev/tty1'
Jan 12 17:47:46 root useradd[729]: new user: name=sshd, UID=106, GID=65534, home=/run/sshd, shell=/usr/sbin/nologin
Jan 12 17:47:46 root usermod[734]: change user 'sshd' password
Jan 12 17:47:46 root chage[739]: changed password expiry for sshd
Jan 12 17:47:47 root sshd[797]: Server listening on 0.0.0.0 port 22.
Jan 12 17:47:47 root sshd[797]: Server listening on :: port 22.
Jan 12 17:49:46 root systemd-logind[420]: Watching system buttons on /dev/input/event3 (Power Button)
Jan 12 17:49:46 root systemd-logind[420]: Watching system buttons on /dev/input/event2 (Power Button)
Jan 12 17:49:46 root systemd-logind[420]: New seat seat0.
Jan 12 17:49:46 root sshd[436]: Server listening on 0.0.0.0 port 22.
Jan 12 17:49:46 root sshd[436]: Server listening on :: port 22.
Jan 12 17:49:49 root sshd[436]: Received SIGHUP; restarting.
Jan 12 17:49:49 root sshd[436]: Server listening on 0.0.0.0 port 22.
Jan 12 17:49:49 root sshd[436]: Server listening on :: port 22.
Jan 12 17:49:49 root sshd[436]: Received SIGHUP; restarting.
Jan 12 17:49:49 root sshd[436]: Server listening on 0.0.0.0 port 22.
Jan 12 17:49:49 root sshd[436]: Server listening on :: port 22.
Jan 12 17:49:50 root login[429]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Jan 12 17:49:50 root systemd-logind[420]: New session 1 of user root.
Jan 12 17:49:50 root systemd: pam_unix(systemd-user:session): session opened for user root by (uid=0)
Jan 12 17:49:50 root login[501]: ROOT LOGIN on '/dev/tty1'
Jan 12 17:51:37 root sshd[436]: Received signal 15; terminating.
Jan 12 17:51:37 root sshd[516]: Server listening on 0.0.0.0 port 22.
Jan 12 17:51:37 root sshd[516]: Server listening on :: port 22.
Jan 12 17:52:35 root sshd[518]: Connection closed by 192.168.100.52 port 51626 [preauth]
Jan 12 17:52:59 root sshd[520]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.100.52 user=root
Jan 12 17:53:01 root sshd[520]: Failed password for root from 192.168.100.52 port 51629 ssh2
Jan 12 17:53:04 root sshd[520]: Failed password for root from 192.168.100.52 port 51629 ssh2
Jan 12 17:53:08 root sshd[520]: Failed password for root from 192.168.100.52 port 51629 ssh2
Jan 12 17:53:13 root sshd[520]: Connection closed by 192.168.100.52 port 51629 [preauth]
Jan 12 17:53:13 root sshd[520]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.100.52 user=root
Jan 12 17:58:47 root sshd[556]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.100.52 user=root
Jan 12 17:58:49 root sshd[556]: Failed password for root from 192.168.100.52 port 51643 ssh2
Jan 12 17:59:17 root sshd[556]: Connection closed by 192.168.100.52 port 51643 [preauth]
Jan 12 17:59:33 root sshd[558]: Connection closed by 192.168.100.52 port 51645 [preauth]
Jan 12 17:59:45 root sshd[560]: Accepted password for root2 from 192.168.100.52 port 51647 ssh2
Jan 12 17:59:45 root sshd[560]: pam_unix(sshd:session): session opened for user root2 by (uid=0)
Jan 12 17:59:45 root systemd-logind[420]: New session 3 of user root2.
Jan 12 17:59:45 root systemd: pam_unix(systemd-user:session): session opened for user root2 by (uid=0)
Jan 12 18:04:09 root sudo: pam_unix(sudo:auth): authentication failure; logname=root2 uid=1000 euid=0 tty=/dev/pts/0 ruser=root2 rhost= user=root2
Jan 12 18:04:15 root sudo: root2 : user NOT in sudoers ; TTY=pts/0 ; PWD=/home/root2 ; USER=root ; COMMAND=/usr/bin/apt-get update
Jan 12 18:04:51 root sshd[560]: pam_unix(sshd:session): session closed for user root2
Jan 12 18:04:51 root systemd-logind[420]: Removed session 3.
Jan 12 18:04:51 root systemd: pam_unix(systemd-user:session): session closed for user root2
Jan 12 18:05:29 root login[673]: pam_unix(login:session): session opened for user root by root(uid=0)
Jan 12 18:05:29 root login[673]: pam_systemd(login:session): Cannot create session: Already running in a session
Jan 12 18:05:29 root login[694]: ROOT LOGIN on '/dev/tty1'
Jan 12 18:06:54 root useradd[703]: new user: name=Atomic, UID=0, GID=0, home=/home/Atomic, shell=
Jan 12 18:07:24 root passwd[708]: pam_unix(passwd:chauthtok): password changed for Atomic
Jan 12 18:08:16 root sshd[709]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.100.52 user=Atomic
Jan 12 18:08:19 root sshd[709]: Failed password for Atomic from 192.168.100.52 port 51690 ssh2
Jan 12 18:08:49 root sshd[709]: Failed password for Atomic from 192.168.100.52 port 51690 ssh2


lg Felix

DeletedUserReAsG

Re: Root Login über Putty funktioniert nicht...

Beitrag von DeletedUserReAsG » 12.01.2018 19:45:42

Solange eine Raute am Zeilenanfang steht, wird die Zeile als Kommentar betrachtet und die betreffende Option wird nicht verändert, sondern der Defaultwert genutzt. Default ist bei dieser Option, dass Root sich nicht per Passwort einloggen kann – und das aus wirklich gutem Grund.

OT: könntest du bitte Ausgaben in [​code] und [/code] einschließen? Dann sind sie nicht so mühselig zu lesen. Auch OT, aber entscheidend dafür, ob ich mich hier noch weiter beteilige: es handelt sich bei diesem „Rootserver“ aber nicht um einen wirklichen Rootserver (in einem Rechenzentrum, mit IP außerhalb der Dialup-Ranges und mit 100MBit/s oder schlimmer), oder?

Atomic7122
Beiträge: 4
Registriert: 12.01.2018 18:33:57

Re: Root Login über Putty funktioniert nicht...

Beitrag von Atomic7122 » 12.01.2018 19:56:02

DAnke!!!!!!!!! das mit der Raute wusste ich nicht... Danke!!! der Server steht bei mir im Haus

Antworten