I have to run a script from server A and connects to 20 more servers over ssh to pull information. Previously i was using a normal user, and that would become a problem once the password for that user is expired. So i was thinking about using a Service Account to run the Script.

Would it be possible to run the script with a nologin user??

  • what is a "nologin" user? if you connect via ssh to a remote server, you either run a shell or some other command. this task has to run with some UID. consider using x509 certificates rather than passwords, because passwords are for humans running interactive sessions. – StefanKaerst Apr 10 at 10:02

As skynats social suggested, using SSH keys solves your problem without the need of nologin user. HERE you can find a simple tutorial on how to perform the setup.

As you have to pull informations from many servers, I would recommend clustershell. It uses SSH to run the same command on many servers in parallel, and much more. HERE you can find the complete documentation.

Not the answer you're looking for? Browse other questions tagged or ask your own question.