neonep
Programmer
- Jun 26, 2003
- 34
Hello all,
I wrote a script in Perl that uses sftp to put and get files from different servers. I have set up a public key/private key authentication on my box and so it never prompts for a password when I run the script for sftp'ing to another server. What I want to happen is, if someone else tries to run the script, if the public key/private key is not set, instead of sftp prompting for a password and hanging there, I just want it to throw an error and quit. How would I do that?
Your help will be greatly appreciated.
Thanks.
I wrote a script in Perl that uses sftp to put and get files from different servers. I have set up a public key/private key authentication on my box and so it never prompts for a password when I run the script for sftp'ing to another server. What I want to happen is, if someone else tries to run the script, if the public key/private key is not set, instead of sftp prompting for a password and hanging there, I just want it to throw an error and quit. How would I do that?
Your help will be greatly appreciated.
Thanks.