how to create a user on a linux box where it - can be used for scp from the remote system - can't be used for ssh login from the remote system
Thanks in advance
You should use scponly. This is especially good if you only want to restrict certain users and maintain SSH with execution privileges for others.
wget 'https://sourceforge.net/projects/scponly/files/scponly/scponly-4.8/scponly-4.8.tgz'
If you are ok to use sftp instead of scp , then Match Group in sshd_config can do the task for you .
The following options need to be enabled in /etc/ssh/sshd_config
Subsystem sftp internal-sftp
Match Group sftpusers
ChrootDirectory /home/%u
ForceCommand internal-sftp -u 002
You can also setup chroot for that user. The ChrootDirectory must contain the necessary files and directories to support the user’s session.