Randy_j53 has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I need to create a script which will connect to Linux and Windows servers to search for the KeyStore files on the servers. Is there a way to do this with out using an ID and Password to connect to the servers?
  • Comment on Connect to Windows and or Linux servers without ID and Password

Replies are listed 'Best First'.
Re: Connect to Windows and or Linux servers without ID and Password
by Corion (Patriarch) on Jul 14, 2015 at 13:33 UTC

    The easiest way is to use passwordless SSH key files, and have them set up to a restricted shell.

    If you don't even want passwordless SSH key files, set up jobs to be run on the machines and have them report (via mail, for example) to a central server.

      Hi Corion, I am not allowed to install anything on the servers. I now our Windows servers do not have SSH. My company has serveral hundred Linux and Windows servers which I have to connect to and search for the KeyStore files so I can copy them to a central location. Is there any other way other than SSH to do this?

        Remove perl from the equation. Deduce how you would connect to each system and complete your task. If you can't do this without installing any additional software then script the process in perl. This doesn't seem like a perl specific issue, sounds more like something missing in your corporate infrastructure/asset management solution.

        You surely must have a consistent system for administrating these boxes with hundreds of them, no? If you could access all those boxes without any credentials whatsoever, couldn't anyone else?

        Do you have an account that can list "dollar sign" shares on the Windows servers? That might be an option. For Linux though, there isn't much you can do unless you export the whole filesystem in NFS with no auth necessary, but that's a really bad idea.

        Whenever you connect to another server, you pretty much need to have an account (login) to do anything.

A reply falls below the community's threshold of quality. You may see it by logging in.