I want to restrict my admin user to /bin directory while permitting to use bash as a shell via ssh.
This is in my sshd_config file:
Match User admin ChrootDirectory /bin X11Forwarding no ForceCommand scponly #PermitTunnel no AllowTcpForwarding no
when I use this command: ssh firstname.lastname@example.org
this error appears:
/bash: No such file or directory Connection to 192.168.200.242 closed.
if I change scponly to internal-sftp in sshd_config, all binary files exist (for example, bash) in / directory via sftp. Why I can't use
/bash as a shell after changing to
How can I get this to work.