0

I need a user that connects to my host with ssh, which is forwarded into a lxc-container.

My solution is:

Match User monitoring 
ChrootDirectory /data/foreign_projects/monitoring 
ForceCommand lxc-console -n monitoring_lxc
  • Hello and welcome to the U&L stack exchange site! Please review the Help Center to get information on how to best post to this site. To get to your question, please edit your post to include additional context. What is the exact issue you are having? Please include details about how you set up your lxc-container and what is the intended outcome and any exact error messages that you get. Thank you! – kemotep Feb 25 at 21:36
  • You'll want to use the ForceCommand option to run a command to connect the user to the container. – Stephen Harris Feb 26 at 3:11
  • @StephenHarris If i use the ForceCommand, can the user exit the lxc? – Salmjak Feb 26 at 7:50
  • When they exit the container, they will return to your script, which can then exit and log them out. – Stephen Harris Feb 26 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.