This problem has been previously described in the Centos Forums here, and is presented again here in what seems to be a different form.
In this case using centos 7, although its possible to su root via eg putty, when attempting an sftp tunneling session requiring an su root (because permitrootlogin in sshd_config is set to 'no'), access is denied. Lets say that the initial login is via 'user1' (ie a non root user setting up the sftp tunnel), and this completes successfully. But the second stage where effectively, su root is attempted, results in an 'access denied' message.
Logs indicate:
Code: Select all
pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
The wincscp program has the following SFTP config:
/usr/libexec/openssh/sftp-server
(have tried sudo /usr/libexec/openssh/sftp-server
sudo su -c /usr/libexec/openssh/sftp-server)
This is the full log detail if required:
Code: Select all
Nov 25 21:19:24 localhost sshd[25585]: Accepted password for hhgp from [external ip] port 48421 ssh2
Nov 25 21:19:24 localhost sshd[25585]: pam_unix(sshd:session): session opened for user user1 by (uid=0)
Nov 25 21:19:25 localhost sshd[25626]: Address 192.168.1.10 maps to localhost.localdomain, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Nov 25 21:19:30 localhost sshd[25626]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.10 user=root
Nov 25 21:19:30 localhost sshd[25626]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Nov 25 21:19:33 localhost sshd[25626]: Failed password for root from 192.168.1.10 port 57098 ssh2
Nov 25 21:20:04 localhost sshd[25626]: Connection closed by 192.168.1.10 port 57098 [preauth]
Nov 25 21:20:04 localhost sshd[25585]: pam_unix(sshd:session): session closed for user user1
m600