LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2015, 11:37 PM   #1
veth_shiva
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
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!!!
 
Old 10-11-2015, 08:11 PM   #2
veth_shiva
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi

Can someone help with above query, how to handle error handling like check the correct host or is SFTP is success or failure using lftp ? Please help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Passwordless connection to sftp server using lftp aarelovich Linux - Software 5 03-25-2014 09:16 AM
passwordless keybased sftp vikash.thbs Linux - Newbie 1 04-30-2013 06:33 AM
Error dowloading with lftp from sftp server: get: Access failed: No such file dgerber Linux - Newbie 0 02-10-2013 04:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration