Password in sftp NOT with key


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Password in sftp NOT with key
# 1  
Old 06-13-2013
Password in sftp NOT with key

I've been trying to get out of this, but my manager wont budge.

He wants to sftp files from a server while passing the password in the script. I have said we need to use keys...he said no.
I asked if we had expect capability...no.

He said "use -b batch file command"

I have checked every thread and search and asked several people. I can't find a way to do this is sftp or ssh.

There is a file containing the password in txt.

Is this even possible?
# 2  
Old 06-13-2013
"interactive password authentication" means "password typed by a human being in realtime authentication", and no substitutes for humans are acceptable to it. It makes sure it reads from a terminal, not a file, not a pipe.

To force it to accept a stored plaintext password, you would have to install a third-party brute forcing utility like expect or the like, which creates virtual terminals to fool things into thinking they're interactive when they're not. It would make your scripts a great deal more complicated since you must lead it step by step.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SFTP prompting for password even though password is in script

Hi All, I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup. I am working on Solaris 10. Here is the code. #!/bin/ksh # sample automatic Sftp script to dump a file USER="user1" PASSWORD="pass1" HOST="host1" sftp $USER@$HOST... (6 Replies)
Discussion started by: megha2525
6 Replies

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

3. HP-UX

To find where sftp public key is installed for user

Hi All, I am facing an issue wherein a new sft public key for a user is not working on our HP-UX m/c. So i have to check where the sftp public keys for some other sample users were installed earlier in the system i.e. under which folder. Can you please help me out on this. (2 Replies)
Discussion started by: ammbhhar
2 Replies

4. Shell Programming and Scripting

Auto Script to Access external Server via SFTP using Password and Key

Hello All, I am stuck! I have access to an external server via SFTP. In order to access the external server I was given a specific port, password, and a ppk. I would to create a script on my server end that can I can setup as a corn job, that will connect to the external server and... (1 Reply)
Discussion started by: kingr008
1 Replies

5. UNIX and Linux Applications

SFTP Passing without DSA Key check

Hi, I am trying to connect through SFTP. Though the DSA 2048 public key is installed in the server machine, the connection is established only with password authentication! When i turn off password authentication in sshd_config file the connection is not working. Please advise, Best... (0 Replies)
Discussion started by: Maharajan
0 Replies

6. UNIX for Dummies Questions & Answers

SFTP Passing without DSA Key check

Hi, I am trying to connect through SFTP. Though the DSA 2048 public key is installed in the server machine, the connection is established only with password authentication! When i turn off password authentication in sshd_config file the connection is not working. Please advise, Best... (0 Replies)
Discussion started by: Maharajan
0 Replies

7. Shell Programming and Scripting

SFTP in a shell script without public/private key

Hi everybody, I need some help on writing a script that is able to remote copy file to one server. I already created this types of scripts, and works ok as long as this server I want to copy from is access through telnet. Here is how I do it: ftp -n xxx.xxx.xxx.xxx << _EOF_ user user_name... (6 Replies)
Discussion started by: Alexis Duarte
6 Replies

8. UNIX for Advanced & Expert Users

Sftp Key Authentication Issue

Hello, We have an issue attempting to login from a Unix Solaris to an NT server using key authentication. I will attempt to provide you with as much of the relevant information regarding the way the system is set up, although I'm workingin solely on the Unix side, so don't have full access to... (3 Replies)
Discussion started by: SteveBurch
3 Replies

9. Shell Programming and Scripting

SFTP in Shell Script with RSA-KEY or password.

I am trying to SFTP to a couple sites. One has an RSA-KEY that was sent to me. Currently I am running that manually using WinSCP. I would like to set it up as a CRON process on our Linux host (Sun). Can I use the rsa-key they sent me in any directory or does it need to be placed in a specific... (2 Replies)
Discussion started by: alemat
2 Replies

10. UNIX for Dummies Questions & Answers

How to add SFTP KEY to UAT SERVER?

Hi All, I have some SFTP Key. I would like to know how do I add them to UAT Server? Please help. Thanks (0 Replies)
Discussion started by: jingi1234
0 Replies
Login or Register to Ask a Question