How to enable SSH for customer on a limited time only?

electric

Well-Known Member
Nov 5, 2001
790
11
318
I would like to enable SSH for customers only on a limited time basis. Is this possible?

So basically, we turn on SSH, and specify a time when it should be automatically disabled. (ie: a month, a week, a day, etc...)

Any ideas?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
The simplest way would probably be to write a short script that you run via cron to switch their login shell in /etc/passwd from /usr/local/cpanel/bin/noshell to /bin/bash and back again.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
The simplest way would probably be to write a short script that you run via cron to switch their login shell in /etc/passwd from /usr/local/cpanel/bin/noshell to /bin/bash and back again.
Good idea. A little time consuming to do this all manually, though.

Would be great to see it added as a feature/option in WHM on the SSH control page... but I'm not going to even bother submitting a feature request into bugzilla, as I have zero belief the cpanel people give even one small piece of crap about making things "easier" or "better" for anyone.

Thanks for your idea.