Sponsored Content
Full Discussion: sftp syntax in script
Top Forums Shell Programming and Scripting sftp syntax in script Post 302381438 by zaxxon on Friday 18th of December 2009 06:59:56 AM
Old 12-18-2009
What did you try so far on your own?
Also we just had it in another thread that it might be (if possible for your environment) better to create passwordless public keys, exchange them to your needs and do the transfer via scp which has the same syntax as rcp. Check this out:

https://www.unix.com/shell-programmin...ivate-key.html
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Syntax error in script

I get this error when I try to run my script (BTW, this is a simple script I am supposed to write for my class) $ menuscript menuscript: syntax error at line 89 : `"' unmatched $ Here is the code (Any help is greatly appreciated) (Line numbers included) 1 #!/bin/ksh 2 ... (2 Replies)
Discussion started by: KindHead
2 Replies

2. Shell Programming and Scripting

Syntax error calling TCL script from shell script

hello everyone i am beginner on shell scripting .and i am working on my project work on ad hoc network i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem " syntax error near unexpected token `('... (1 Reply)
Discussion started by: marcoss90
1 Replies

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

4. Shell Programming and Scripting

CHECK SCRIPT SYNTAX

Hi everyone, i'd like someone chechk this script, i know it's very simple but it doesn't work good, let me tell you this script works over huge directories, maybe that's the problem, if somebody can give me other way to develop, or show me where it's the problem, i'll appreciate it. ... (9 Replies)
Discussion started by: Newer
9 Replies

5. UNIX for Dummies Questions & Answers

SFTP syntax without specifying private key location (no password)

Hi all, I need to connect using SFTP from Red Hat to Windows. Connection between servers work when I specify location of my private key in the script. However, I want to use syntax without private key location specified. I know this should work, as I found it in older scripts. Scripts were... (0 Replies)
Discussion started by: yavvie
0 Replies

6. Shell Programming and Scripting

Script syntax help

#!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'` CMD=`ps -eaf | grep -c mysql` if ; then ./mysql $ip $user $pass & else sleep 15... (6 Replies)
Discussion started by: galford
6 Replies

7. Shell Programming and Scripting

SFTP or scp with password in a batch script without using SSH keys and expect script

Dear All, I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies

8. Shell Programming and Scripting

Help with syntax of Python script

I added some fields to some existing code, and all was well. Just added a few more, and BAM. I've looked this over forever, but being a newbie to Python, I see NOTHING. The code generates syslog messages, and the new fields were added around "rtp_lapse*" . Any clues??? #!/usr/bin/python ... (4 Replies)
Discussion started by: gmark99
4 Replies

9. UNIX for Beginners Questions & Answers

Syntax error on script

Evening All (or morning for some), Could anyone have a look at the below and advise where i've going wrong with the syntax as i keep getting the below error while trying to run. Any help would be really apprecaited. ./testout: line 13: syntax error near unexpected token `else' ... (4 Replies)
Discussion started by: mutley2202
4 Replies

10. UNIX for Beginners Questions & Answers

Syntax in a simple script

I am in the process of writing a script. A very preliminary version is giving a syntax error. The script is #!/bin/bash #file1='./data/heu/hout1' exec 10<&0 exec < './data/heu/hout1' #file1='./data/heu/hout1- i=1 j=0 while read file1 do echo $file1 echo $i if then... (3 Replies)
Discussion started by: ngabrani
3 Replies
ASTGENKEY(8)						     Linux Programmer's Manual						      ASTGENKEY(8)

NAME
astgenkey - generates keys for for Asterisk IAX2 RSA authentication SYNOPSIS
astgenkey [ -q ] [ -n ] [ keyname ] DESCRIPTION
astgenkey This script generates an RSA private and public key pair in PEM format for use by Asterisk. The private key should be kept a secret, as it can be used to fake your system's identity. Thus by default (without the option -n ) the script will create a passphrase- encrypted copy of your secret key: without entering the passphrase you won't be able to use it. However if you want to use such a key with Asterisk, you'll have to start it interactively, because the scripts that start asterisk can't use that encrypted key. The key is identified by a name. If you don't write the name on the command-line you'll be prompted for one. The outputs of the script are: name.pub The public key: not secret. Send this to the other side. name.key The private key: secret. Those files should be copied to /var/lib/asterisk/keys (The private key: on your system. The public key: on other systems) To see the currently-installed keys from the asterisk CLI, use the command show keys OPTIONS
-q Run quietly. -n Don't encrypt the private key. SECURITY
The keys are created, using the umask of the user running the command. To create the keys in a secure manner, you should check to ensure that your umask is first set to disallow the private key from being world- readable, such as with the following commands: umask 0066 astgenkey yourkey And then make the key accessible to Asterisk (assuming you run it as user "asterisk"). chown asterisk /var/lib/asterisk/keys/yourname.* FILES
/var/lib/asterisk/keys SEE ALSO
asterisk(8), genrsa(1), rsa(1), http://www.voip-info.org/wiki-Asterisk+iax+rsa+auth AUTHOR
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> Permission is granted to copy, distribute and/or modify this docu- ment under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2. Asterisk May 14th, 2005 ASTGENKEY(8)
All times are GMT -4. The time now is 07:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy