commands to remote sftp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting commands to remote sftp
# 1  
Old 08-07-2008
commands to remote sftp

Hello,
Is there a way to use wc, sed or other commands against remote sftp in a regular shell script?


wc -c *.* | grep total | sed s/total// ?


thanks in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SFTP from remote server

Hi All,While sftp from remote server an error (/) is coming before the file in a script.Please find the below log. The file is on home directory on remote server. (6 Replies)
Discussion started by: kiranparsha
6 Replies

2. Shell Programming and Scripting

Sftp batch processing commands

Hello, I have a UNIX script to sftp batch processing. Here is my sftp command. ftp -b toopc userid@sftp.hostname.com In the file toopc I have the following commands: mget *.csv bye This brings in all files with an extension of .csv However, I need to only bring in files that ... (6 Replies)
Discussion started by: schlinzj
6 Replies

3. Shell Programming and Scripting

Spawn sftp and Shell commands

Hi everyone, I'm no killer in shell scripting, that is why I've searched and found a little script that explained how to do what I wanted to do : a FTP transfer from distant servers. I adapted it cause as such, it didn't work. As I needed to do some very simple shell commands (erase and... (2 Replies)
Discussion started by: mederik
2 Replies

4. UNIX for Dummies Questions & Answers

Help on commands in sftp using BatchFile

Hi, The script didn't continue as "20130109" folder is already created on the destination server. Please help. Entry in script: cat > $filebatch << __EOF__ mkdir $current_date mkdir $current_date/$fpdomain cd $current_date/$fpdomain ls -l __EOF__ Error: sftp -b... (12 Replies)
Discussion started by: chococrunch6
12 Replies

5. 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

6. Shell Programming and Scripting

Batch file for sftp commands

I am trying to automate an sftp command so that it does not stop and ask for the password each time the calling shell script #!/bin/ksh sftp -b tst_1_batchfile.txt GLAXGBUPMPSOUT@204.90.134.116 the batchfile contents : password XXXXXX cd /GLAXGBUPMPSOUT/GSKENT/GLAXGF2FOPFF put... (4 Replies)
Discussion started by: Shrabanti
4 Replies

7. Shell Programming and Scripting

execute shell commands with in sftp

Hi All, Please let me know how do I execute some of the shell commands like cat, find ,grep within sftp. Any help in this regard would be greatly appreciated. Thanks, (5 Replies)
Discussion started by: tommy1
5 Replies

8. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

9. UNIX for Advanced & Expert Users

FTP commands in SFTP

Hi, I am in the process of migrating all my FTP data flows into SFTP to make data more secure... I have used many quote site commands in our FTP sesssion. In SFTP i found that there is no option to do such commands. Does any body here know to overcome the current situation. Regards,... (2 Replies)
Discussion started by: Astra
2 Replies

10. Shell Programming and Scripting

Need help in sftp basic commands

I'm trying to make use of some common generic functions already present in the scripts loaded in the environment. A variable VAR1 is declared and used in the generic functions. Its value is also set in the generic function. Now I need to use that generic function for PURGING of some old files... (2 Replies)
Discussion started by: livetaurean19
2 Replies
Login or Register to Ask a Question
sftp-server(1M)                                           System Administration Commands                                           sftp-server(1M)

NAME
sftp-server - SFTP server subsystem SYNOPSIS
/usr/lib/ssh/sftp-server DESCRIPTION
sftp-server implements the server side of the SSH File Transfer Protocol as defined in the IETF draft-ietf-secsh-filexfer. sftp-server is a subsystem for sshd(1M) and must not be run directly. There are no options or config settings. To enable the sftp-server subsystem for sshd add the following to /etc/ssh/sshd_config: Subsystem sftp /usr/lib/ssh/sftp-server See sshd_config(4) for a description of the format and contents of that file. There is no relationship between the protocol used by sftp-server and the FTP protocol (RFC 959) provided by in.ftpd. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/usr/lib/sftp-server ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshdu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
sftp(1), ssh(1), ssh-add(1), ssh-keygen(1), sshd(1M), sshd_config(4), attributes(5) To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed location. AUTHOR
Markus Friedl SunOS 5.10 30 Jul 2003 sftp-server(1M)