scp output


 
Thread Tools Search this Thread
Operating Systems Solaris scp output
# 1  
Old 03-10-2011
scp output

Hi,
I use an expect script to scp a file from server1. It use to work fine until i tried them on some specific sparc servers where it failed. Upon some analysis i found that the output of scp was different, causing expect to fail.
Generally when we do scp a file from server1, we are prompted for password, however, in this case the output was "user@server1's password". I am puzzled as to why scp on identical os's have two different outputs.
# 2  
Old 03-10-2011
Have you considered using keys instead of hardcoded text passwords? They avoid this problem: ssh/scp/sftp become automatic and noninteractive, not needing to be nudged with third-party tools like expect.

They're much, much more secure than keeping a plaintext password around anyway -- that's why you had to use expect at all. ssh, and any other sane login system like su and sudo, are designed to prevent you from automating an interactive password. That you had to use expect at all is a subtle hint writ in mile-high flashing neon letters that you're really not supposed to.
# 3  
Old 03-10-2011
Yes I know that passwordless auth can bypass this issue and in the end I will take that route (as a matter of fact, one scp command is the script is to exchange the .pub files), but still i am curious as to why scp is behaving differently.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Need help with scp

Hi, I am trying to do scp from server A to server B. But while doing the scp i am getting the following message. +-----------------------------------------------------------------+ | This system is for the use of authorized users only. | | Individuals using this computer system... (6 Replies)
Discussion started by: sidh_arth85
6 Replies

2. UNIX for Dummies Questions & Answers

Unable to copy file using SCP (Input/output & Permission denied error)

Hi, I am facing issue while using scp. Source & target machines are Linux & HP-UX respectively. On target machine, if I fire the following command, I get error: Now if I try scp on another file, which is on the same source machine, it works fine. All directories and subdirectories... (2 Replies)
Discussion started by: Technext
2 Replies

3. Red Hat

scp with su

Hi Friends, I am trying to copy some files over the network in between my linux servers. I am using scp command for this. by default direct ssh root login is disabled on all of my linux servers. Normaly we used to login as a normal user and the su to th root user. unfortunately root user is... (1 Reply)
Discussion started by: arumon
1 Replies

4. Shell Programming and Scripting

Is this possible with SCP?

I normally download a directory recursively using: scp -r <name>@host:<path> . This has worked fine. As everyone knows this will download all of the directory named in <path> and all of the sub directories. I would like to know if it is possible to not download a particular file if it... (5 Replies)
Discussion started by: cpabrego
5 Replies

5. Shell Programming and Scripting

how to direct scp output to a file in bash shell or script

I can run this from the command line: scp -i identfile /path/file_to_send remotelogin@remotebox:/path_to_put_it/file_to_send and I get: file_to_send 100% |***************************************************************************| 0 00:00 but if I do: scp -i identfile... (6 Replies)
Discussion started by: NewSolarisAdmin
6 Replies

6. Shell Programming and Scripting

Capture scp output

I have a simple script that uses scp to copy some files from one server to another. I want to capture the files that are copied but simple redirection to a file does not work. So I want to capture this output from the scp command in a log file. -bash-3.00$ scp -pr /export/jumpstart/Files... (7 Replies)
Discussion started by: Tornado
7 Replies

7. Shell Programming and Scripting

What is scp-ed over?

Hi all, i have a directory in server A. the directory path is /home/kevin. I need to scp the directory to another server B. i would like to ask, when i do a scp of the /home/kevin , i can expect all the files from A to go B. However, how about the hidden files? for example the ssh keys in the... (4 Replies)
Discussion started by: new2ss
4 Replies

8. Shell Programming and Scripting

scp output fm script won't go to file

Have a script that scp's tar file to multiple other servers in a for loop. Need to set monitoring and notification on it for when it fails. Running this line of code in a 'for' loop... scp $SOURCE_RECOVERY_TARFILE ${HOST}:${CURR_RECOV_TARFILE} 2>&1 | tee ${MONFILE} Their are two outputs... (7 Replies)
Discussion started by: nmikes
7 Replies
Login or Register to Ask a Question