Query Regarding sftp passwordless using lftp ERROR Handling
Hello Guys
I got a requirement to generate a file and sftp to target server, i need to achieve password less sftp.
I have set up like pub.key etc set up properly in target and able to sftp successfully via lftp client, something like below command:
lftp -u mysuser,placeholder "sftp:\\hostname.com" -c "cd \tmp\Test; put test_me.dat; bye;";
The above commands works perfectly but how i can makesure if any error had occurred or not, basically how to print the error message if say my hostname is wrong? In my Shell script i am not getting any message displayed even i store in a variable and print it.
Kindly help me with this query, your inputs are really valuable.
Thanks in Advance!!!
|