04-17-2013
Quote:
Originally Posted by
skpvalvekar
But when I give 'get <Remotepath> <local_path>' it is not working.
I'm planning to use this way without giving the lcd option.
Also, weird thing is that get is also not accepting any optional parameters like '-p'.
You do not seem to have the usual openssh version of sftp, but a proprietary one. A proprietary one with bugs, even.
If it doesn't work without lcd, then it doesn't work without lcd. You'll need to use lcd -- or cd earlier in the script itself.
Last edited by Corona688; 04-17-2013 at 12:49 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi.
I'm trying to copy multiple folders from the remote machine to the local machine. I wrote a batch file to run an ftp window.
The problem I am having is that the only command to copy files is mget *, and this copies only files, not folders.
For example, ftp ts555
cd ts555/test
' test... (5 Replies)
Discussion started by: leenyburger
5 Replies
2. Shell Programming and Scripting
Hi All,
please help me to write a shell that ftp a file which is in the local (C:\) drive to a Unix server.
Where as i know the IP for the Unix server.
i could do this process by using ftp command.
pls help me to write as Shell script.
Thanks in advance for all of your answers.:b::b: (3 Replies)
Discussion started by: little_wonder
3 Replies
3. UNIX for Advanced & Expert Users
Hi List,
I have set up a chrooted SFTP setup following the instructions I found on tech republic:
/blog/opensource/chroot-users-with-openssh-an-easier-way-to-confine-users-to-their-home-directories/229
I have successfully got it all working and I can download files when logged in via sftp... (0 Replies)
Discussion started by: landossa
0 Replies
4. UNIX for Dummies Questions & Answers
I'm making an sftp-connection to a remote server. I want the result of an ls-command in a local file and the result of ls on another folder in another local file. Because everything has to go as fast a possible I wan't to do everyting in one connection.
The command I use is : psftp -v -batch -b... (4 Replies)
Discussion started by: pistach
4 Replies
5. Shell Programming and Scripting
Hi,
Is there a way I can copy a file from a server to a local folder (i.e. My Documents)? can it be done by scp?
I tried this but it just rename the file as the folder it has to be transferred at.
scp -r name@some_server:/home/user/file.txt 'somehere\home\home_dir'
Thanks. (4 Replies)
Discussion started by: erin00
4 Replies
6. Shell Programming and Scripting
Hi,
Below script used for sftp get,
#/bin/bash
USER=xxx
PASS=xxx
HOST=xxx
REMOTE_FILE=$1
LOCAL_FILE_LOC=$2
cd $LOCAL_FILE_LOC
lftp sftp://$USER:$PASS@$HOST:10022 -e "get $REMOTE_FILE; bye"
If file does not exist in sftp server, and file (same as remote file name) exists in local dir,... (4 Replies)
Discussion started by: vhegde1011
4 Replies
7. UNIX for Dummies Questions & Answers
Hi.
I have managed to transfer a file from remote to my raspberry pi, but I have the camera mounted on the Raspbien so I would like to transfer the image the other way.
I use this line:
sshpass -p 'PASSWORD' scp -- USER@ssh.servername.com:/www/cam/image.jpg /home/pi/shared/web/image.jpg (4 Replies)
Discussion started by: brickglow
4 Replies
8. UNIX for Beginners Questions & Answers
I have a machine in my LAN that runs Ubuntu and I have full access in it.
There is another PC on the Internet that has a public IP eg 3.3.3.3 and it servers as https server and access to it is by username and password. On the remote PC all i have is access through https using username/passwd.
... (3 Replies)
Discussion started by: atux_null
3 Replies
9. UNIX for Beginners Questions & Answers
HI Guys,
Can anyone help me to retrieve the latest file from below example using SFTP
I have below list of files in a folder
v403t.lstprgms.sortin1
val027.d099.fwest.oct2711
xcelrptd.d1400sqp.dec1713.t040459.@02del
xcelrptd.d1400sqp.dec1713.t073308.@02del... (3 Replies)
Discussion started by: heye18
3 Replies
10. UNIX for Beginners Questions & Answers
I'm using sftp to connect from a Windows server (User ID is ssh1) to AIX server (User ID ftpeapsg) to access /sftp/ftphrssg/HRSSG/EAPSG in AIX server. User ftpeapsg is created on AIX server.
Able to connect to AIX server fine without the need for password however not able to see the folder... (4 Replies)
Discussion started by: userguy
4 Replies