944,126 Members | Top Members by Rank

Ad:
Nov 3rd, 2009
0

how to enter for the prompt?

Expand Post »
hi,
basically i am trying to write a quick script to remote copy something as follow.

"" scp user@192.168.1.5:/var/tmp/file.txt /var/tmp/newfile.txt ""

if i do above cmd on the shell, i will be asked for password:

my question is, how i do automate the password part within the shell script to make it just copy without prompting for the password.


thanks
Similar Threads
k2k
Reputation Points: 15
Solved Threads: 1
Posting Whiz
k2k is offline Offline
351 posts
since Nov 2007
Nov 3rd, 2009
0
Re: how to enter for the prompt?
Configure the ssh to use private keys.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Nov 3rd, 2009
0
Re: how to enter for the prompt?
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Nov 4th, 2009
0
Re: how to enter for the prompt?
wow, thanks sknake. those 2 articles give me exactly what i need. = )
k2k
Reputation Points: 15
Solved Threads: 1
Posting Whiz
k2k is offline Offline
351 posts
since Nov 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: connect to oracle retrieve data and work around the data through shell script
Next Thread in Shell Scripting Forum Timeline: how to move files and check the completion.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC