Allow SSH but disallow SFTP to a particular user group. Once disallowed, if the user group tries to access SFTP, it should not be allowed and all connections should be closed and the user should get the prompt back.
I'm able to disallow a particular user group using a
Match block and
But not able to get the prompt back once login fails.
abcd> sftp usergroup@X.X.X.X [Does not allow but it remains in a hang state]
Need to press Ctlr C to get back the prompt (abcd>)
abcd> sftp usergroup@X.X.X.X [Fails next line prompt should be back] abcd>
I want to know if it is possible, if yes share your inputs.