# How to block admin from sftp and ssh?

**URL:** <https://forum.hestiacp.com/t/how-to-block-admin-from-sftp-and-ssh/4887>\
**Category:** Uncategorized\
**Created:** [November 8, 2021, 12:39pm UTC](https://forum.hestiacp.com/t/how-to-block-admin-from-sftp-and-ssh/4887 "2021-11-08T12:39:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![964f4c495c](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/9/a9a28c/32.png) [@964f4c495c](https://forum.hestiacp.com/u/964f4c495c)\
**Post date:** [November 8, 2021, 12:39pm UTC](https://forum.hestiacp.com/t/how-to-block-admin-from-sftp-and-ssh/4887/1 "2021-11-08T12:39:10Z")

</div>

Hello hestiacp masters.

Please help me.  
I set ‘admin’ user ssh to ‘nologin’. But admin can still access sftp. How to block it from having ssh and sftp access?

By ‘admin’, I dont mean ‘root’.

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [November 8, 2021, 12:47pm UTC](https://forum.hestiacp.com/t/how-to-block-admin-from-sftp-and-ssh/4887/2 "2021-11-08T12:47:33Z")

</div>

```auto
Match User admin
MaxSessions 0

```

Note this will also disable Filemanger access!

(Update Should be working fine)

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [December 8, 2021, 12:47pm UTC](https://forum.hestiacp.com/t/how-to-block-admin-from-sftp-and-ssh/4887/3 "2021-12-08T12:47:39Z")

</div>

Closed on December 8, 2021, 12:47pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
