Report and Reset SSH via Casper

qsodji
Contributor

Wanted to share a few scripts that allow me to find the status of ssh on my clients but also reset those that for some reason have ssh turned off.
https://jumpt.wordpress.com/2015/02/25/report-and-reset-ssh-status-via-casper/
As always feedbacks are welcome.

1 ACCEPTED SOLUTION

qsodji
Contributor

They are the defaults enabled keys/values in sshd_config file. I wanted to leave it as simple as found, though I have also tested it with an empty sshd_config file and it works.

View solution in original post

4 REPLIES 4

davidacland
Honored Contributor II
Honored Contributor II

Just had a read through. Good work!

I've used ```
nc -z localhost 22
``` in the past to check for connectivity.

I haven't enabled it this way before. Just curious what these lines in ssh_config are for:

  • SyslogFacility AUTHPRIV
  • AcceptEnv LANG LC_*
  • Subsystem sftp /usr/libexec/sftp-server

qsodji
Contributor

They are the defaults enabled keys/values in sshd_config file. I wanted to leave it as simple as found, though I have also tested it with an empty sshd_config file and it works.

davidacland
Honored Contributor II
Honored Contributor II

Ah ok, thanks for confirming. I wondered if it was some "magic" I hadn't heard of ;)

qsodji
Contributor

oh... I see what you did there. Thank you for the vote of confidence!