Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.