0

I have a PC with sshd service (192.168.1.1).
The PC contains two users user1 and user2.
I installed lxc service and configured a container.
How can I configure ssh server on 192.168.1.1 that connecting user2 will be chrooted to lxc container.

1 Answers1

0

OpenSSH may be configured to only allow a particular user to execute a particular command, by prepending a string to the public key in the authorized_keys file.

This:

ssh-rsa <key> <key name>

Should be changed to this

command="chroot command" ssh-rsa <key> <key name>
Robbie Mckennie
  • 1,123
  • 1
  • 8
  • 21