User restriction help in Linux. Need to block login but enable sftp

tdevinda

Member
Nov 16, 2006
858
19
0
41
Mattegoda
Hi guys,
I have a user in PC 'A' say 'happyman'
I need to enable sftp from PC 'B' to happyman by calling
PCB # sftp happyman@PCA
but he should not be able to login by ssh (PCB # ssh happyman@PCA)

how is this possible? the real applicaition is that I use a shell script to push backup files using happyman and I need to run a batch sftp file, and that needs non-interactive login.

any help will be appreciated.