sftp BatchMode issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sftp BatchMode issue
# 1  
Old 03-20-2008
sftp BatchMode issue

Hello All,
I have a issue with the below script that i am using to sftp a file.

sftp -o BatchMode=yes $sftpLogin <<EOF
cd /ftp/cds
get cdstesting.csv
quit
EOF

When i use this, the connetion establishes and the connections doesnt returns from and hangs in the connecting mode. I think there is an issue with EOF. can someone please help ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

SFTP issue

I'm trying to transfer a 1 GB file using sftp process. The process always gets disconnected in between (may be after 20%) file transfer when it runs from a batch script. If i do it in interactive mode, it works.. I checked with account admin to see the timeout option if any, but didn't help..... (2 Replies)
Discussion started by: Aswin Pillai
2 Replies

2. Shell Programming and Scripting

SFTP issue

Hi, I am trying to connect to a windows server via sftp from a user A and my job did log into it via user B. So I uses the following command to connect to teh new server. B>sftp -o IdentityFile=/pathtofile/id_rsa a@windows_server and it worked. But I don't want to use private key. Can we... (6 Replies)
Discussion started by: George1234
6 Replies

3. Solaris

Passwordless sftp issue

Hello Experts, I am trying to setup passwordless sftp from one of linux box to solaris box. I have generated key-pair and below is the permissions of the respective files. drwx------. 2 sftpuser sftpuser 4096 Dec 17 23:57 .ssh drwx------. 2 sftpuser sftpuser 4096 Dec 17 23:57 .... (16 Replies)
Discussion started by: sai_2507
16 Replies

4. Red Hat

sftp issue

Hi experts, While trying to sftp from one the red hat linux box it is giving following error. Status: Connecting to 10.1.82.155... Response: fzSftp started Command: open "prodbill@10.1.82.155" 22 Command: Pass: *********... (2 Replies)
Discussion started by: sai_2507
2 Replies

5. Shell Programming and Scripting

Issue with sftp

Hi Friends, I have created a shell and which will sftp file1 from serverA to serverB. In sftp prompt on serverA it is showing the file1 is available on serverB. where as when connected to ServerB it is not showing the file1. How come this. ServerA sftp> ls hsstest.dmp sftp> pwd Remote... (9 Replies)
Discussion started by: sriramis4u
9 Replies

6. UNIX for Advanced & Expert Users

Issue with SFTP from different server by

Hi , I have 2 servers , say Server A and Server B . ssh keys have been exchanged for unix account sftpuser(created on server A) in such a way that A shell script (Script1.Sh) written on Server A can PULL flat files from Server B and save them on server A . Now I am able to execute... (4 Replies)
Discussion started by: MrActionHero
4 Replies

7. Solaris

Urgent need help - issue sftp

hi experts, i have a problem with my sftp which install on sparc sun solaris os version 5.9, i have install this packages below on my server : libgcc-3.3-sol8-sparc-local openssl-0.9.8d-sol8-sparc-local zlib-1.2.3-sol8-sparc-local openssh-4.5p1-sol8-sparc-local and i... (2 Replies)
Discussion started by: bucci
2 Replies

8. AIX

SFTP issue

Hi!! SFTP5.0 is not working thru automatically pushing files, but manual file transfer is happening fine... If anyone knows,Pls share the reason. Regards, Senthil (3 Replies)
Discussion started by: senthil_seera
3 Replies

9. UNIX for Dummies Questions & Answers

BatchMode issue

Hello All, I have an issue with sftp in BatchMode option. I am using the below command to sftp a file in ssh2 from a script. sftp -o BatchMode=yes userid@servername <<EOF cd /ftp/cds put quotes.csv quit EOF But the connection doesnt returns back from sftp and it just hangs in the... (3 Replies)
Discussion started by: kotasateesh
3 Replies

10. Solaris

SunOS 5.8 sftp-BatchMode Problem

Hi Gurus I have to connect from a SunOS 5.10 to a 5.8 using sftp in BatchMode. For this, I have generated a Public-Key (ssh-keygen -b 1024 -P "" -t dsa) on the 5.10 and saved it in ~remote-user/.ssh/authorized-keys on the 5.8. Then, running either one of ssh or sftp, it asks for the... (0 Replies)
Discussion started by: unilover
0 Replies
Login or Register to Ask a Question
SSH2_SFTP_MKDIR(3)							 1							SSH2_SFTP_MKDIR(3)

ssh2_sftp_mkdir - Create a directory

SYNOPSIS
bool ssh2_sftp_mkdir (resource $sftp, string $dirname, [int $mode = 0777], [bool $recursive = false]) DESCRIPTION
Creates a directory on the remote file server with permissions set to $mode. This function is similar to using mkdir(3) with the ssh2.sftp:// wrapper. PARAMETERS
o $sftp - An SSH2 SFTP resource opened by ssh2_sftp(3). o $dirname - Path of the new directory. o $mode - Permissions on the new directory. o $recursive - If $recursive is TRUE any parent directories required for $dirname will be automatically created as well. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Creating a directory on a remote server <?php $connection = ssh2_connect('shell.example.com', 22); ssh2_auth_password($connection, 'username', 'password'); $sftp = ssh2_sftp($connection); ssh2_sftp_mkdir($sftp, '/home/username/newdir'); /* Or: mkdir("ssh2.sftp://$sftp/home/username/newdir"); */ ?> SEE ALSO
mkdir(3), ssh2_sftp_rmdir(3). PHP Documentation Group SSH2_SFTP_MKDIR(3)