Sftp


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 8  
No.

The problem is that you are not correctly automating this as I have mentioned a number of times.

That is the problem. You are implementing this in the wrong way.
# 9  
So, can you show us the output that you are getting? I'm wondering if you are being prompted for the SSH key passphrase as opposed to the remote user password.

A simple test would be something like:-
Code:
sftp ftpsic@$NodoFtpOms <<END_SCRIPT
dir
END_SCRIPT

If this doesn't work, then perhaps we can look at the process of creating and sharing keys for a password-less connection. The client that opens the connection should create the SSH key pair. The public key from the client needs to be copied to the server you are connecting to. The file permissions need to be suitably tight. If you open the files up to more access, then the ssh/sftp client and/or the sshd will reject them. Doing a chmod 666 ..... will break it.

Can you show us the output of ls -l ~/.ssh on the client as the executing user and on the server side as the targeted user? Do not share the content of the private keys on-line.



Thanks, in advance,
Robin
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies

2. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies

3. Red Hat

Chroot sftp users, remote sftp login shows wrong timestamp on files

Hello, I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration. #pwd... (8 Replies)
Discussion started by: bobby320
8 Replies

4. Shell Programming and Scripting

sftp

Hi, Can you please tell me what the below command does cat <<EOF1 > $tmp1 binary lcd $targetDir cd ${remoteDir} ls quit EOF1 cat $tmp1 set -x sftp6 -P 2246 -B $tmp1 --password=file://<ctl>/.gspass | tee outputfile Actually my requirement is if the sftp succeed, then only it... (3 Replies)
Discussion started by: help_scr_seeker
3 Replies

5. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

6. Shell Programming and Scripting

What is SFTP ?

Frnds, 1.Whats is SFTP ? 2.Why we are going for that ? 3.If I want to do sftp a file from a server ABC to my local machine XYZ, what are different entries I need to put in (what are all )various files/location in unix? 4.If i need to put a entry in a common file(s) in unxi, can you give... (6 Replies)
Discussion started by: Gopal_Engg
6 Replies

7. Shell Programming and Scripting

sftp

when executing the below script ,it was prompting password .I want password to be taken from parameter.Please any help sh a.sh file.txt a.sh === user="uesr1" pass="password12" filename=$1 source_dir="/abc/a1/xx/outputs" target_dir="/azs/zzz/cc/outputs" sftp $user@servername <<eof... (1 Reply)
Discussion started by: mohan705
1 Replies

8. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies

9. Shell Programming and Scripting

Need help for SFTP

Hi All, I am using sftp to send a file.I want to know is there any way to check that the file has been sent to destination.Like in ftp we can spool the log and check "226 Transfer complete" accordingly we can decide the script return success.Please let me know if we can do something to get... (1 Reply)
Discussion started by: ravi.sadani19
1 Replies

10. UNIX for Dummies Questions & Answers

Using SFTP

I used to use an 'SFTP' command weekly, but all of a sudden it won't work. I used to do: sftp -b <file with put commands> <username>@<server> But all of a sudden every time that I try now I get: Permission denied (publickey,password,keyboard-interactive). Connection closed Any... (4 Replies)
Discussion started by: FredSmith
4 Replies

Featured Tech Videos