f-secure sftp in shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting f-secure sftp in shell script
# 1  
Old 07-08-2005
f-secure sftp in shell script

Hi,

I am trying to use sftp in a ksh - Shell script, but not even a simple script like this returns not output:

sftp username@remotehost <<END
ls

END

If I do something like this:

sftp username@remotehost <<END | tee logfile
ls

END

I get this error message:
Warning: tcgetattr failed in ssh_rl_set_tty_modes_for_fd: fd 1: Not a typewriter
SshReadLine/sshreadline.c:2084: Setting tty modes failed.


This works fine with open ssh , but not with f-secure ssh.
Anybody an idea were the problem could be ?
May this be a configuration problem auf the f-secure ssh ?
# 2  
Old 07-08-2005
MySQL

OK , I made it know with a given temporary file. This works like this:

echo "ls" > $tmp/sftpcmd
sftp -B $tmp/sftpcmd username@remotehost
rm $tmp/sftpcmd
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SFTP password through shell script.

Hi All, I would be happy, if someone help me on this that I have only SFTP ID and Password to transfer some log files from webserver boxes to SFTP server Anyone help me that how to pass the password parameter throough the shell scripts, since i don't have ssh login access on the SFTP... (2 Replies)
Discussion started by: l_gshankar24
2 Replies

2. Shell Programming and Scripting

Help With SFTP using shell script

Hi All, Scenario : How to securely FTP the text file from a particular location(in unix system) to the windows ftp server (my PL is suggesting to use SCP command to accomplish this). Detailed description: I have created a Oracle job and scheduled it in dbms_scheduler. The job will invoke... (3 Replies)
Discussion started by: Sachi Vasishta
3 Replies

3. UNIX for Advanced & Expert Users

secure sftp login not working in RedHat Linux

I'm using RedHat Linux 6.1 and wanted to create an user account with only access to single directory. Have followed all the steps from below link and still user is not able to login: How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH) (link removed) While the other users, which... (10 Replies)
Discussion started by: asyed
10 Replies

4. Shell Programming and Scripting

Transfer files from linux server to windows using secure ftp (sftp)

HI, I have to transfer files from linux server to windows using secure ftp (sftp) .Kindly help me out. (3 Replies)
Discussion started by: manushi88
3 Replies

5. Shell Programming and Scripting

SFTP Shell script

Hi All, I have done the Private - Public keys generation( and sharing) and have written a script for automating the SFTP. Need to make sure if it will work: sftp.sh #!/bin/bash . config.ini sftp $SFTP_USER@$SERVER <<EOF cd $SFTP_RDIR #ls -lrt | grep $SFTP_RFILE | wc -l get... (2 Replies)
Discussion started by: Arpit Narula
2 Replies

6. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

7. Shell Programming and Scripting

SFTP to server through Shell Script

I am sftp-ing to a server through a shell script from my local machine. sftp user@host put out.txt bye On executing the script, it prompts to enter the password, and after giving the password it successfully connects to the host.But the problem is that the remaining statements after the... (1 Reply)
Discussion started by: Kishore_1
1 Replies

8. Shell Programming and Scripting

shell script to get sftp files

did anyone knows a script to get a latest file in a folder,,i try to get the newest file at a folder via sftp and i want to make a crontab to do this once a day,,can someone give me the script to get the latest file?? (5 Replies)
Discussion started by: Cellscript
5 Replies

9. Shell Programming and Scripting

SFTP shell script help

HI I need to write script to transefer files from windows server to UNIX and visa versa.... can any one enroute to the solution ........? I am new to SFTP .. would requst you provide some helpful informaion, Basics of SFTP also appreciated Thanks in Advance. Madan (1 Reply)
Discussion started by: madankumar
1 Replies

10. Shell Programming and Scripting

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... (0 Replies)
Discussion started by: val0822
0 Replies
Login or Register to Ask a Question