Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two accounts on my computer. One account is named bob. The other account is for a user named joe. I am using RSA key with a passphrase. I can connect BUT when I add the lines Match Group joe and restart ssh I get a connection refused error. Everything else I do seems to work.

ChrootDirectory /home/joe
ForceCommand internal-sftp
AllowTcpForwarding no

until I add:

Subsystem sftp internal-sftp
Match Group joe
ChrootDirectory /home/joe
ForceCommand internal-sftp
AllowTcpForwarding no

I took the public key out of joe account to see if that would help but nothing I do seems to jail the joe account. I would love any advice.

share|improve this question
up vote 0 down vote accepted

Is the user joe in the group joe? You could try:

Match User joe

You need to restart sshd after any change. The directory /home/joe must belong to joe and have permissions set appropriately too. Also, I recall reading somewhere that it's better to create a new directory to jail the user rather than using an existing /home

share|improve this answer
thank you for your help yes joe and joe user where in the same group. I think there where some errors in my config file I used about back up and got it working. – Reese Apr 10 '13 at 19:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.