Sponsored Content
Top Forums Shell Programming and Scripting automate sftp using unix script Post 302116472 by pondlife on Friday 4th of May 2007 07:19:33 AM
Old 05-04-2007
Unattended SFTP

Hi All,

I'm attempting the same thing here; my particular problem is that I'm trying to get files from a UNIX box to a VMS box with different account names. So, I believe, the shared public key option wouldn't work for me (because the account names have to be the same?).

Anyway, I'm interested in the 'expect' solutions posted by the previous participants of this thread but they don't seem to work for me. In the last post there's a variable $arg mentioned - is this the password? And is this passed on the command line?

Many thanks,

p.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automate SFTP is not working

Hi All:cool:, i tried to automate SFTP process after passwordless authendication. Stil i am getting error... Can anyone help.... ------------------- sample code below ------------------- sftp -v $mdskk@100.4.4.75 << EOF cd /data mget *.tar.gz bye EOF... (2 Replies)
Discussion started by: senthil_seera
2 Replies

2. AIX

Automate SFTP UNIX to Windows

Hi, Could you please help to solve the below issue... my requirement is automate the SFTP between UNIX and Windows server. I want to get and put some files to UNIX AIX machine(SFTP client) to Windows server(SFTP server). For that, i have generated key pair (private/public) in my AIX machine .... (6 Replies)
Discussion started by: mahiban
6 Replies

3. Shell Programming and Scripting

How to automate sftp in a script to 'get' files.

Hi, I read a couple of forum entries about scripting sftp using the '-b' option, but in my case it still prompts for the password. Does anyone have a sample script for an sftp block to 'get' files from the remote server without prompting for a password? Both the remote and the local servers... (1 Reply)
Discussion started by: ChicagoBlues
1 Replies

4. Shell Programming and Scripting

How to automate sftp without using expect script?

How to automate sftp with out using expect script? My batch file has the password but it is not taking. Please see below. I want to use this sftp connection in a loop for pushing new files in a directory one at a time. Hence I can not use an expect script. bash-2.05$... (5 Replies)
Discussion started by: Tuxidow
5 Replies

5. Shell Programming and Scripting

Unix Shell Script to automate email alert

Hi all, I have a task on my plate which is of high priority. I need an automated email alert that checks FTP notices subdirectory on a daily basis and forwards any word files to a group of people. This word files gets created whenever there is an issue with FTP connectivity. Please help...... (1 Reply)
Discussion started by: stunnerz_84
1 Replies

6. UNIX for Dummies Questions & Answers

automate sftp in sun solaris.

Hi, I'm using Sun Solaris OS. I have configured sftp and can exchange files in command prompt. Now when I try to automate it in ksh script, facing issue as I want to capture the status if the transfer was successful or not. So tried sftp -b and sftp -B option but its not working. The... (3 Replies)
Discussion started by: shinny
3 Replies

7. Shell Programming and Scripting

Using expect to automate sftp

I am trying to use a for loop in my expect cmdFile that I am calling. I want to be able to call either one file name or a series of file names in the working directory (that I won't know the names before hand) and then pass the names to the sftp program. Something like for i in (ls *txt) do (0 Replies)
Discussion started by: vedder191
0 Replies

8. Shell Programming and Scripting

SFTP script to automate login in to remote server

Greetings, guys. I'm not much of a programmer forgive me for being a noob, because of someone leaving, I was put in an IT spot where I have to figure out a few things. Being new to Linux and programming has been a challenge. My boss has asked me to create an automated script to connect to a 3rd... (7 Replies)
Discussion started by: giovannym
7 Replies

9. UNIX for Dummies Questions & Answers

Automate sftp process using script

Hi, guys, I am trying to automate a sftp process using "expect" method (since the key authentication method is disabled in my company network, there is no helping it). In order to try, I type in the command manually: sftp @ > << EOF >cd >ls -l >EOF >Connecting to @servername password: ... (3 Replies)
Discussion started by: warmboy610
3 Replies

10. Shell Programming and Scripting

Sftp automate

hi, I am trying to automate a file download process using sftp. There is some logic to download files. 1) I need to login to destination server and then go to folder. 2) find list of files and count 3) using list of files I need to eliminate three selective files and download remaining... (1 Reply)
Discussion started by: getmilo
1 Replies
pam_unix(5)							File Formats Manual						       pam_unix(5)

NAME
pam_unix - authentication, account, session, and password management PAM modules for UNIX SYNOPSIS
DESCRIPTION
The UNIX service module for PAM, provides functionality for all four PAM modules: authentication, account management, session management and password management. The module is a shared object that can be dynamically loaded to provide the necessary functionality upon demand. For an interpretation of the module path, please refer to the related information in pam.conf(4). Unix Authentication Module The UNIX authentication component provides functions to verify the identity of a user, and to set user specific credentials compares the user entered password (or password retrieved from the user's smart card) with the password from UNIX password database, including the protected password database for trusted systems. If the passwords match, the user is authenticated. If the user also has secure RPC credentials and the secure RPC password is the same as the UNIX password, then the secure RPC credentials are also obtained. The following options may be passed to the UNIX service module: syslog(3C) debugging information at level. Turn off warning messages. It compares the password in the password database with the user's initial password (entered when the user authenticated to the first authentication module in the stack). If the passwords do not match, or if no password has been entered, quit and do not prompt the user for a password. This option should only be used if the authentication service is designated as optional in the configuration file. It compares the password in the password database with the user's initial password (entered when the user authenticated to the first authentication module in the stack). If the passwords do not match, or if no password has been entered, prompt the user for a password. psd stands for personal security device, for the current implementation there is only one security device: the smart card. It compares the password in the password database with the password stored on the user's smart card. With this option the PAM Framework prompt "Enter PIN:" is used instead of the password prompt. This option is only supported with the authentication or password module types (auth, password) services in the or in the configuration files. When prompting for the current password, the UNIX authentication module will use the prompt, "Password:" unless one of the following sce- narios occur: 1. The option is specified and the password entered for the first module in the stack fails for the UNIX module. 2. The option is not specified, and the earlier authentication modules listed in the file have prompted the user for the pass- word. 3. The option is specified. In this case, the UNIX authentication module will use the prompt "Enter PIN:". In cases 1 and 2, the UNIX authentication module will use the prompt "System Password:". The function sets user specific credentials. If the user had secure RPC credentials, but the secure RPC password was not the same as the UNIX password, then a warning message is printed. If the user wants to get secure RPC credentials, then keylogin(1) needs to be run. Unix Account Management Module The UNIX account management component provides a function to perform account management The function retrieves the user's password entry from the UNIX password database and verifies that the user's account and password have not expired. For trusted systems, this module also validates the allowed access time and access terminal based upon the security configuration. The following options may be passed in to the UNIX service module: syslog(3C) debugging information at level. Turn off warning messages. Unix Session Management Module The UNIX session management component provides functions to initiate and terminate UNIX sessions. For UNIX, updates the last successful or unsuccessful login time in the protected password database for trusted mode. The account management module reads the information to dis- play the previous time the user logged in. The following options may be passed in to the UNIX service module: syslog(3C) debugging information at level. Turn off warning messages. is a NULL function. Unix Password Management Module The UNIX password management component provides a function to change passwords in the UNIX password database. This module must be in It can not be or The following options may be passed in to the UNIX service module: syslog(3C) debugging information at level. Turn off warning messages. It compares the password in the password database with the user's old password (entered to the first password module in the stack). If the passwords do not match, or if no password has been entered, quit and do not prompt the user for the old password. It also attempts to use the new password (entered to the first password module in the stack) as the new password for this module. If the new password fails, quit and do not prompt the user for a new password. It compares the password in the password database with the user's old password (entered to the first password module in the stack). If the passwords do not match, or if no password has been entered, prompt the user for the old password. It also attempts to use the new password (entered to the first password module in the stack) as the new password for this module. If the new password fails, prompt the user for a new password. It prompts the user for the PIN (with the PIN, the PAM Framework can retrieve a password from the smart card) and the old password is retrieved from the smart card. It compares the password in the password database with the user's old password. If the passwords match, it prompts the user for a new password. If the user's password has expired, the UNIX account module saves this information in the authentication handle using The UNIX password module retrieves this information from the authentication handle using to determine whether or not to force the user to update their pass- word. APPLICATION USAGE
On trusted systems, the interfaces implemented in the UNIX service module, are not thread-safe. Otherwise, they are thread-safe. A can- cellation point may occur while a thread is executing any of these interfaces. They are not cancel-safe, async-cancel-safe, nor async-sig- nal-safe. WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality. SEE ALSO
keylogin(1), pam(3), pam_authenticate(3), pam_setcred(3), syslog(3C), nsswitch.conf(4), pam.conf(4), pam_user.conf(4). pam_unix(5)
All times are GMT -4. The time now is 03:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy