Hallo,
ich habe normalerweise den Server so eingerichtet, das man sich nur auf der Shell mit Passwort anmelden kann und das der Login auf root nicht funktioniert. Nun möchte ich doch verschiedene Sachen (wie Logs) gerne über WinSCP anschauen.
Dazu habe ich nun versucht den Login für root auf sftp zu beschränken und dies dann der Login nur mit Pub-Key funktioniert.
Hier mal meine Konfigurationen:
sshd_config
mit dem rsa keys habe ich nun schon x-mal rumgespielt. Ob über putty erstellt konvertiert und eingepfelgt oder mir den private key vom server gezogen.... Ich komme immer zum gleichem Fehler.
Einloggen in WinSCP, dann eingabe des Schlüssels für private Key und dann kommt access diened (Schlüssel für privatekey ist richtig) und erneute Passwort eingabe auforderung. Wenn der Private-Schlüssel falsch wäre kommt ne andere Meldung.
Im Server Log sehe ich sowas:
einer eine Idee?
ich habe normalerweise den Server so eingerichtet, das man sich nur auf der Shell mit Passwort anmelden kann und das der Login auf root nicht funktioniert. Nun möchte ich doch verschiedene Sachen (wie Logs) gerne über WinSCP anschauen.
Dazu habe ich nun versucht den Login für root auf sftp zu beschränken und dies dann der Login nur mit Pub-Key funktioniert.
Hier mal meine Konfigurationen:
sshd_config
Code:
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel VERBOSE
LoginGraceTime 120
PermitRootLogin forced-commands-only
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
IgnoreRhosts yes
...
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
Match User root
ForceCommand /usr/lib/misc/sftp-server
mit dem rsa keys habe ich nun schon x-mal rumgespielt. Ob über putty erstellt konvertiert und eingepfelgt oder mir den private key vom server gezogen.... Ich komme immer zum gleichem Fehler.
Einloggen in WinSCP, dann eingabe des Schlüssels für private Key und dann kommt access diened (Schlüssel für privatekey ist richtig) und erneute Passwort eingabe auforderung. Wenn der Private-Schlüssel falsch wäre kommt ne andere Meldung.
Im Server Log sehe ich sowas:
Code:
Oct 31 10:55:01 c061 CRON[24444]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 31 10:55:01 c061 CRON[24444]: pam_unix(cron:session): session closed for user root
Oct 31 10:55:04 c061 sshd[24446]: Set /proc/self/oom_adj to 0
Oct 31 10:55:04 c061 sshd[24446]: Connection from 24.147.175.78 port 55883
Oct 31 10:55:07 c061 sshd[24446]: Failed none for root from 24.147.175.78 port 55883 ssh2
Oct 31 10:55:07 c061 sshd[24446]: Found matching RSA key: a1:0c:f8:84:25:6b:08:53:d5:6a:3a:46:3b:78:fd:ce
Oct 31 10:55:07 c061 sshd[24446]: Found matching RSA key: a1:0c:f8:84:25:6b:08:53:d5:6a:3a:46:3b:78:fd:ce
Oct 31 10:55:07 c061 sshd[24446]: ROOT LOGIN REFUSED FROM 24.147.175.78
Oct 31 10:55:07 c061 sshd[24446]: Failed publickey for root from 24.147.175.78 port 55883 ssh2