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.