09-30-2008
SFTP - non-interactive - using passphrase
Hi,
I have written a script that does SFTP successfully without using the password (Thanks to this site ) and it works fine.
The thing is - this script uses the public and private key generation with a "null" passphrase.
But I now need to write a script that does SFTP non-interactively but still must be given a the generated passphrase in order to function.
Can anybody help or suggest please??
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
sftp -b script.txt <hostname>
user-authentication through non-interactive way is desired. But, its failing to do so.
Could anyone kindly advise.
Thanks for any/all help at the earliest.
Regards,
Dheeraj. (1 Reply)
Discussion started by: dheeruchakri
1 Replies
2. Solaris
Hi,
I am new to solaris & i am using version 9. Can anyone give me step by step procedure on how to create a passphrase file for a user, so that he can use it for SSH session.
Any help on this is issue is highly appretiated.
Ansari (6 Replies)
Discussion started by: ansori
6 Replies
3. Shell Programming and Scripting
Hi all,
I generally use the something along the lines of the following when I need to perform SFTP's ... sftp -v -o IdentityFile=${IdentityFile} \
-b ${SFTP_BATCH_FILE} \
${USRID}@${IP_OR_DNS}:${REMOTE_DIR} 2>&1 | tee -a ${SFTPLOG}Now currently we are not using any passphrase... (4 Replies)
Discussion started by: Cameron
4 Replies
4. UNIX for Advanced & Expert Users
Hi All,
We have a special requirement from our client, we need to automate one of the sftp job with password authentication. I know sftp can be automated with Key authentication, but this is not what I am looking for.
Can some body help me, a method like .netrc in FTP automation or like sftp... (6 Replies)
Discussion started by: shihabvk
6 Replies
5. Homework & Coursework Questions
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (1 Reply)
Discussion started by: rits
1 Replies
6. Homework & Coursework Questions
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (8 Replies)
Discussion started by: rits
8 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to connect from Unix machine to Windows 2003 server using passphrase method. It is connecting to the server and the connection is immediately closing. Below is the stack trace. Can anyone let me know what wrong with it?
cwadmin@iut1wps1:/home/cwadmin> ssh username@targetip... (1 Reply)
Discussion started by: vijayin
1 Replies
8. Shell Programming and Scripting
Hi,
I need to sftp from one Unix Server (source) to another (destination) (both SunOS) non-interactively.
I did the following :
1) Generated public key in source server in $HOME/.ssh dir without giving any passphrase
2) Added the contents of the public key generated to authorized_keys2... (7 Replies)
Discussion started by: Sabari Nath S
7 Replies
9. UNIX for Advanced & Expert Users
Hi,
How to configure minimum passphrase (Not UNIX password) requirements on any UNIX box?
Passphrase - the one user enteres while generating pub/pvt keys using ssh-keygen.
Thanks!
Reddy (3 Replies)
Discussion started by: reddyr
3 Replies
10. UNIX for Dummies Questions & Answers
Hello all,
can we SFTP to the destination server in a non-interactive mode with out estbalishing the public key of origination server in the destination server? meaning i want to harcode the password as part of the below script or as an variable?
Please let me know if there is any better way to... (2 Replies)
Discussion started by: Ariean
2 Replies
LEARN ABOUT DEBIAN
astgenkey
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)