Simulating - unix login + scp via shell scripts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Simulating - unix login + scp via shell scripts
# 1  
Old 07-01-2005
Simulating - unix login + scp via shell scripts

Hi,

I am a new guy in this forum, I am trying to do the following stuff
and want some inputs

I am doing this manually, by using the scp command to copy file from
a remote unix machine and entering the password at the password prompt.

Like this,

scp -p user@machine.com:/tmp/test.sh .

user@machine.com's password:
test.sh 100% |*************************************************************************************************** ********| 66 00:00


How could i do this in a shell script, I mean, how will i simulate
entering of password via shell script ??
Please let me know.

Thanks in advance.
# 2  
Old 07-01-2005
You could setup ssh keys so you don't have to worry about passwords:
http://www.arches.uga.edu/~pkeck/ssh/

Otherwise you could use expect?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simulating enter key via shell script

How to simulate enter key via shell script (2 Replies)
Discussion started by: proactiveaditya
2 Replies

2. Shell Programming and Scripting

SSH - Passing Unix login passwords through shell scripts

Hi All , I need to call a script runscript_B.sh on server A, the runscript_B.sh script locating in server B. The runscript_B.sh in calls another script runscript_A on server A itself. it seend, i need to be connect from Server A to Server B using ssh. I have tryed like this in... (3 Replies)
Discussion started by: koti_rama
3 Replies

3. UNIX for Advanced & Expert Users

Unix/ Shell scripts

Hi, I need to develop a function incrementor that increments a given number that is passed as an argument (this should use eval). so, am not able to get much info on eval by googling (perticularly on incrementing). please if any one can help me out. thanks in advance (4 Replies)
Discussion started by: geervani
4 Replies

4. UNIX for Advanced & Expert Users

Simulating scp through ssh

How to simulate scp command using ssh? (5 Replies)
Discussion started by: vickylife
5 Replies

5. UNIX for Advanced & Expert Users

unix shell scripts for running on solaris

am new to programmming any body suggest , how to execute, shell script interactively and like stream line edit (3 Replies)
Discussion started by: srini_ibmadmin
3 Replies

6. AIX

Difference between writing Unix Shell script and AIX Shell Scripts

Hi, Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies

7. UNIX for Advanced & Expert Users

Connecting to Oracle through unix shell scripts

Hi, Can some one help me in connecting to oracle through unix shell scripts with examples. Regards Narayana Gupta (1 Reply)
Discussion started by: guptan
1 Replies

8. UNIX for Dummies Questions & Answers

Learning to write UNIX Shell Scripts

Hi All, I am relatively new to UNIX. I know some basic commands. I am learning to write shell scripts. My first aim is to connect to a Data Base via shell script. Any ideas on this? Any links, docs which will tell me about scripting?? Thanks VEN (1 Reply)
Discussion started by: VENC22
1 Replies

9. Shell Programming and Scripting

Making a SOAP call from within unix shell scripts

Hi guys, Is it possible to make SOAP calls from within Unix shell scripts? I need to access a web service from within UNIX in order to lookup something while I am doing some parsing on a file. Regards, Laud (2 Replies)
Discussion started by: Laud12345
2 Replies

10. Shell Programming and Scripting

simulating a menu using shell programming like in windows.

Hi Friends, I would like to write a shell script in unix which displays a menu. The options in the menu needs to be chosen using the navigation keys(up arrow or down arrow). At present I am entering the menu option number for the option to be chosen. Can anybody give me an idea about how the... (1 Reply)
Discussion started by: malini
1 Replies
Login or Register to Ask a Question

Featured Tech Videos