LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-13-2008, 09:49 PM   #1
kushkothari
Member
 
Registered: Oct 2008
Posts: 31

Rep: Reputation: 15
Question how to give password in shell script after scp


i have to transfer file using scp
when ever i do so I have to type password after the scp command is executed
example

(shell script code)
scp abc.text user@hostname
(while running this shell script after this command it ask for password)
(shell script code)
I want to give the password with this command so that this entire script should work automatically.
 
Old 10-13-2008, 11:08 PM   #2
venkat_k
Member
 
Registered: Sep 2008
Posts: 36

Rep: Reputation: 15
I guess this can be done through "expect" tool.
 
Old 10-14-2008, 12:13 AM   #3
kushkothari
Member
 
Registered: Oct 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Lightbulb

I am using RSA key now so it's working without password
Thanks
 
  


Reply



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
scp, how to pass password in script ebel.velda Linux - Software 4 07-17-2007 05:13 PM
automating scp copy, how to enter password via script? stefaandk Programming 3 11-29-2006 09:57 AM
How to tell shell script a password? Etoile Linux - Newbie 5 04-05-2006 09:16 PM
Shell Script with ssh & scp ErikJohnson Linux - Software 3 03-11-2004 04:53 PM
Shell Script with ssh & scp ErikJohnson Linux - Networking 1 03-11-2004 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:56 PM.

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