I am trying to use sftp to pull a file from a remote server.
Both client and server-side users are created with adduser --system
and their shell is /usr/sbin/nologin
. The users are called legit-backup
.
Public-key authorisation has been configured for the client user to have SSH access to the server as a user of the same name. When I try to pull down the file /home/legit-backup/test
a file using the command sudo -u legit-backup scp legit-backup@<remote-server>:~/test
, I receive the error protocol error: mtime.sec not present
, no files copy down.
If I change the remote user's shell to /bin/bash then sftp works as normal.
I wan to use /usr/sbin/nologin
for security reasons, the user should not be able to have SSH access other than sftp, is it possible?
0 Answers