Sponsored Content
Top Forums Shell Programming and Scripting How to automate sftp without using expect script? Post 302432923 by pludi on Monday 28th of June 2010 02:52:55 AM
Old 06-28-2010
Talk to the client, and ask them what they would prefer:
  • Get a public key from you, and implement it so that you can authenticate yourself with it
  • Have the password for their service passed from an expect script where it's possibly easy for everyone to read
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

automate sftp using unix script

Hi All, I need to write a UNIX script that automates the sftp process. I should be able to do a sftp to a secure box and get a file from there. I am having a problem doing this because no matter what I do, when I run my script, I get a prompt at command line asking for a password. How could I... (34 Replies)
Discussion started by: priyamurthy2005
34 Replies

2. Shell Programming and Scripting

Help with Expect SFTP script

Hi All, Here is my Expect script, I don't get any error message when I run it. But the file never goes to other system? I also paste the output screen below. When I run the script, the script runs so fast. But when I do it manually, it takes about 10 minutes for the file to transfer. ... (1 Reply)
Discussion started by: samnyc
1 Replies

3. Solaris

Issue with Expect Script for SFTP.

Hi Experts, I am learning expect and wrote the below script for automatic sftp into a server: #!/usr/local/bin/expect -f -d spawn sftp -v test@mumux503 # logs into mumux503 as test user expect "password:" sleep 20 send "test\r"; # sending the password for test... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies

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

5. Shell Programming and Scripting

Expect Script to Automate SSH

How would I write an expect script to automate ssh and what file extention do expect files use? (11 Replies)
Discussion started by: Prodiga1
11 Replies

6. Shell Programming and Scripting

Expect script to automate telnet session

Hi all, I am currently running a daemon which creates a virtual terminal for testing purposes. Essentially, if I were to interact with it manually, this is what I get. john@test1:~$telnet localhost 7777 Trying ::1... Connected to localhost. Escape character is '^]' mip6d> pl eth2... (6 Replies)
Discussion started by: abxccd
6 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

Expect Script for SFTP Upload

I am attempting to utilize an expect script (that is called from a parent bash script) to perform a file transfer over sftp. The script works except I cannot catch timeouts. I need to be able to tell in the parent bash script when the expect script has timed out, or completed successfully. It... (3 Replies)
Discussion started by: thaller
3 Replies

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

10. 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
pam_dce(5)																pam_dce(5)

NAME
pam_dce - authentication, account, and password management PAM functions for DCE SYNOPSIS
/usr/lib/security/libpam_dce.so.1 DESCRIPTION
The DCE PAM modules allow integration of DCE into the system entry services (such as login, telnet, rlogin, ftp) through the pam.conf(4) file. The DCE service module for PAM consists of the following three modules: the authentication module, the account management module, and the password management module. All three modules are supported through the same loadable library, /usr/lib/security/libpam_dce.so.1 is the interface that services the requests from These requests will be communicated to the DCE security server, which in turn sends the response back to ilogind. This response is then sent back to /usr/lib/security/libpam_dce.so.1. Authentication Module The authentication module certifies the identity of a user and the user's credentials. It passes the authentication key derived from the user's password to the DCE Security Service. The Security Service then uses the authentication key to certify the user and the user's cre- dentials. The following options can be passed to the authentication module through the pam.conf(4) file: debug Turn on syslog debugging at the LOG_DEBUG level. nowarn Turn off warning messages about not being able to acquire DCE credentials. use_first_pass Use the initial password (entered when the user is authenticated to the first authentication module in the stack) to authenticate with DCE. If the user can not be authenticated or if this is the first authentication module in the stack, quit and do not prompt a password. It is recommended that this option be used only if the authentication mod- ule is designated as optional in the pam.conf(4) configuration file. try_first_pass Use the initial password (entered when the user is authenticated to the first authentication module in the PAM stack) to authenticate with DCE. If the user cannot be authenticated or if this is the first authentication module in the stack, prompt for a password. A user must be authenticated and the user's credentials set before a system entry service can access any file directories owned by the user that are mounted through DTS. Account Management Module The account management module provides a function to perform account management (pam_sm_acct_mgmt(3)). sends a request to the DCE implementation of pam_sm_acct_mgmt(3) function which retrieves the user's account and password expiration information from the DCE Security Server and verifies that the user's account and password have not expired. The following options can be passed to the account module through the pam.conf(4) file: debug Turn on syslog debugging at the LOG_DEBUG level. nowarn Turn off warning messages displayed when a user's account and/or password are going to expire. pam_sm_acct_mgmt(3) calls the function sec_login_inquire_net_info(3) to retrieve information about when a user's account and/or password is going to expire. Password Management Module The password management module provides a function to change passwords (pam_sm_chauthtok(3)). The following options can be passed to the password module through the pam.conf(4) file: debug Turn on syslog debugging at the LOG_DEBUG level. nowarn Turn off warning messages about not being able to change passwords. try_first_pass Use the initial password (entered to the first password module in the PAM stack) to authenticate with DCE. If the user cannot be authenticated or if this is the first password module in the stack, prompt for a password. use_first_pass Use the initial password (entered to the first password module in the PAM stack) to authenticate with DCE. If user cannot be authenticated or if this is the first password module in the stack, quit and do not prompt for a password. It is recommended that this option be used only if the DCE password module is designated as optional in the pam.conf(4) configuration file. SEE ALSO
pam(3), sec_login_setup_identity(3), sec_login_valid_and_cert_ident(3), sec_login_set_context(3), sec_login_inquire_net_info(3), pam.conf(4), pam_unix(5) ilogind(1m) HP DCE
pam_dce(5)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy