Help needed with secure shell "sftp"


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help needed with secure shell "sftp"
# 1  
Old 12-10-2007
Help needed with secure shell "sftp"

I am using
sftp -V
sftp: F-Secure SSH 3.1.0 (build 12) on sparc-sun-solaris2.8

I think it's happening due to secure shell. I can not rename files with "get". As "get" is working fine with open shell sftp.

Here are the details about the problem:

"get" does not rename the file. It actually thinks I want to get “eieio” and “a1” from pontoon - it's behaving like “mget”.

>sftp user1@pontoon

sftp> cd test

/home/vmmpprod/test

sftp> get eieio a1

test/a1: No such file or directory.

eieio | 0 kB | 0.0 kB/s | TOC: 00:00:01 | 100%

sftp> close

sftp> quit

We usually ftp large files and put them through "pipes" so that we do not have to store the big files. I tried using "scp". But it overwrites the pipe with physical file.

>mkfifo a1
>ls -lrt a1
prw-rw-r-- 1 appsw prod 0 Dec 10 10:56 a1
>more scp_test
#!/bin/ksh

scp user1@pontoon:$1 $2

exit_status=$?

return $exit_status

>scp_test test/eieio a1
eieio | 6B | 0.0 kB/s | TOC: 00:00:01 | 100%
>ls -lrt a1
-rw-rw-r-- 1 appsw prod 6 Dec 10 10:56 a1

Am I missing something here? Any help will be appreciated.

thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

3. UNIX for Dummies Questions & Answers

Movie-style "secure uplink"

Hello, First post here at the unix.com forums. I got into unix while I did a one year crash course (if you can call a one year period a crash course) in server virtualization. That's roughly two years ago, and since then, I've set up an Ubuntu based web server at home running everything... (4 Replies)
Discussion started by: crazyrobban
4 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

7. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

8. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

9. AIX

How to use "ssh secure shell" to setup

I want do ssh without password from windows to AIX. I can use putty and WinScp tool to do it. However, when I use ssh secure shell, I still need input password to login AIX I use the following steps to do: Keys Generated with ssh-keygen2 In order to set up user public-key authentication,... (1 Reply)
Discussion started by: rainbow_bean
1 Replies

10. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies
Login or Register to Ask a Question
SSH2_SFTP_LSTAT(3)							 1							SSH2_SFTP_LSTAT(3)

ssh2_sftp_lstat - Stat a symbolic link

SYNOPSIS
array ssh2_sftp_lstat (resource $sftp, string $path) DESCRIPTION
Stats a symbolic link on the remote filesystem without following the link. This function is similar to using the lstat(3) function with the ssh2.sftp:// wrapper in PHP 5 and returns the same values. PARAMETERS
o $sftp - o $path - Path to the remote symbolic link. RETURN VALUES
See the documentation for stat(3) for details on the values which may be returned. EXAMPLES
Example #1 Stating a symbolic link via SFTP <?php $connection = ssh2_connect('shell.example.com', 22); ssh2_auth_password($connection, 'username', 'password'); $sftp = ssh2_sftp($connection); $statinfo = ssh2_sftp_lstat($sftp, '/path/to/symlink'); $filesize = $statinfo['size']; $group = $statinfo['gid']; $owner = $statinfo['uid']; $atime = $statinfo['atime']; $mtime = $statinfo['mtime']; $mode = $statinfo['mode']; ?> SEE ALSO
ssh2_sftp_stat(3), lstat(3), stat(3). PHP Documentation Group SSH2_SFTP_LSTAT(3)