How to restrict a jump user (into openSSH jumpbox) to only SSH to another server?
1
vote
2
answers
2052
views
My Goal:
restrict a jump users (into OpenSSH jumpbox) to only SSH to another server. Users should not be able to list directories, cd or anything else except ssh from jumpbox to another server.
What I have:
- Active directory users login into jump server then SSH to other servers
- OpenSSH jump server configured on Ubuntu 20.04
What I've done:
edited the
/etc/ssh/sshd_config
:
Match User testuser
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
ForceCommand /bin/false
When I add ForceCommand /bin/false
, testuser cannot even ssh to jump server. Without it, user can login to jump server but can still list directories and cd.
Asked by Arnold Jerry
(11 rep)
Feb 21, 2022, 02:03 AM
Last activity: Jul 22, 2025, 05:35 PM
Last activity: Jul 22, 2025, 05:35 PM