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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. AIX
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
3. AIX
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
4. UNIX for Dummies Questions & Answers
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
5. UNIX for Advanced & Expert Users
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. Shell Programming and Scripting
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. Shell Programming and Scripting
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
8. UNIX for Dummies Questions & Answers
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
9. UNIX for Dummies Questions & Answers
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
10. Shell Programming and Scripting
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
LEARN ABOUT PHP
ssh2_sftp_mkdir
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)