telefix1
Goto Top

Ssh root login per WinSCP

Moin moin, ok., ich weiss, das Thema ist schon oft behandelt worden, aber bei mir funktioniert es trotzdem nicht:

Ich möchte mich per WinSCP als root auf dem Linux-Server anmelden und zwar mit Benutzername und passwd.
Über die Konsole direkt geht es, als eingeschränkter User "master" mit WinSCP auch. Aber eben nicht als root.

Ja, der root-Zugang mit PW ist gefährlich und mit PubKey besser. Und die sudo-Funktionen sind mir auch bekannt...

Also, wo liegt der Fehler in meiner Konfiguration?

MfG. telefix1

Anbei die sshd_config:
  1. Package generated configuration file
  2. See the sshd(8) manpage for defails

  1. What ports, IPs and protocols we listen for
Port 22
  1. Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
  1. HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

AllowUsers master pwreset
AllowTcpForwarding yes
Banner /etc/ssh/banner
UseDNS no
  1. ...but breaks Pam auth via kbdint, so we have to turn it off
  2. Use PAM authentication via keyboard-interactive so PAM modules can
  3. properly interface with the user (off due to PrivSep)
#PAMAuthenticationViaKbdInt no
  1. Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

  1. Logging
SyslogFacility AUTH
LogLevel INFO

  1. Authentication:
LoginGraceTime 600
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

  1. rhosts authentication should not be used
#RhostsAuthentication no
  1. Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
  1. For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
  1. similar for protocol version 2
HostbasedAuthentication no
  1. Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

  1. To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

  1. Uncomment to disable s/key passwords
#ChallengeResponseAuthentication no

  1. To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes

  1. To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no

  1. Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes

X11Forwarding no
X11DisplayOffset 10
PrintMotd no
#PrintLastLog no
KeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net
#ReverseMappingCheck no

Subsystem sftp /usr/lib/sftp-server

UsePAM yes

Content-Key: 135377

Url: https://administrator.de/contentid/135377

Ausgedruckt am: 28.03.2024 um 20:03 Uhr

Mitglied: datasearch
datasearch 07.02.2010 um 15:59:03 Uhr
Goto Top
Kannst du deinen Post mal etwas besser Formatieren? die < code > anweisung macht das hier um einiges Übersichtlicher.

So,

AllowUsers master pwreset

Sagt doch eigentlich schon alles.

Du brauchst eine neue Option "PermitRootLogin yes" und musst root in die Liste der erlaubten Benutzer eintragen. Schau mal in die MAN-Page von sshd_config oder auf diese FAQ.

Anmerkung: Per User zu sperren ist aufwendig. Lieber mit "AllowGroups meinsshbenutzer" eine Gruppe definieren und alle betreffenden Benutzer hier aufnehmen.
Mitglied: telefix1
telefix1 07.02.2010 um 16:51:01 Uhr
Goto Top
Kannst du deinen Post mal etwas besser Formatieren? die < code > anweisung macht das hier um einiges Übersichtlicher.

...na klar, war nur in Eile...

AllowUsers master pwreset

...habe ich total "übersehen" face-wink

Du brauchst eine neue Option "PermitRootLogin yes" ....

...das hatte ich ja schon.

Der Resr war dann ein Kinderspiel. Danke und einen schönen Sonntag noch!

MfG. telefix1
Mitglied: datasearch
datasearch 07.02.2010 um 17:20:00 Uhr
Goto Top
Du brauchst eine neue Option "PermitRootLogin yes" ....

...das hatte ich ja schon.

LOL na das habe ich dann doch überlesen. Soviel zur Formatierung. Viel Spaß beim Kopieren als root face-wink