I have a requirement to set up a SSH tunnel between two hosts. SSH server runs on a Linux host, and the SSH client (PuTTY) runs on a Windows host.
I have set up a separate user account (say 'tunnel') on the Linux machine to allow this. This user is not supposed to execute any commands but will only keep the SSH connection for tunneling when logged in from PuTTY. For that particular reason, I have set
/usr/bin/passwd as the login shell for this user.
My question is, Is this a good practice in terms of security when it comes to a SSH tunnel? I couldn't find much information on the Internet about this setup but read that this shell can be used on a file sharing server.