Thanks for the reply. I thought about that issue and in the script I checked the user id I am executing as and it is root. In root's home directory I have the .ssh/known_hosts file with the key in it. If I remove the key and execute the sftp from the command line it detects there is no current key and prompts if I want to add it. I reply with yes and it adds the key. I will try adding the /etc/ssh/known_hosts to see if that helps.
In reply to Re^2: Error with Net::SFTP:Foreign
by ScooterTrash
in thread Error with Net::SFTP:Foreign
by ScooterTrash
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |