'Upgrading' to sftp from ftp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting 'Upgrading' to sftp from ftp
# 1  
Old 01-14-2010
Data 'Upgrading' to sftp from ftp

Somebody made a policy that 'we use sftp now instead of ftp'. I have recommended we use scp because I can't for the life of me think of a *good* reason to use sftp and not scp. But most of what I do is stupid stuff without a good reason. I get judged on how much I can just say yes, no matter how dumb it is.

The technology exists to do public/private keys, and we can do it *technically*, but explaining to the higher ups about keys and delaying the project long enough to convince/educate everyone that would need to be convinced/educated so that we can be allowed to set up public/private keys would cost me personally, no matter that it is not my fault.

The higher ups want to be able to check off the box on a form that says: we use sftp instead of ftp without any effort and without bothering anyone or changing anything about how we do stuff.

Since it is my job to do this, I want to be able to %s/ftp/sftp/g in the shell scripts and be done.

However this is not possible it turns out. sftp won't take a password in batch mode. Now I know all about setting up keys on servers to get passwordless login, but they aren't going to let me put my key on their server because they likely don't know WTF a key is and can't be bothered to learn. They've already given me the password, and shown that connecting manually with a password prompt works, and are not interested in the month of arguments and explaination and emails necessary to explain to everyone about keys.

In fact, if I could get keys installed, I wouldnt even use sftp in the scripts I'd use scp. This isn't going to happen. In need to pass a password in an automated fashion.

Is there any parameter or setting that I can pass sftp so that it will just take a password even though that is dumb? I live in a dumb world. I just want to be dumb and have it work.

Currently I use ftp -in. I want the equivalent of that for sftp. I tried sftp -b - but that doesn't accept a password.

Thanks.
# 2  
Old 01-14-2010
sftp doesn't take passwords that way for all the same reasons ssh doesn't. About the only thing that might work to fake a typed in password convincingly enough is the 'expect' tool/language.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP and SFTP functionality

Hi Friends, I need to make a Unix script, where i need ftp and sftp functionality. Let me describe in details: I need to import few files from remote server, now these remote server either support ftp or sftp not both. So i need a script where my script will try to do ftp first and if it... (8 Replies)
Discussion started by: gnnsprapa
8 Replies

2. Shell Programming and Scripting

Migration from FTP to SFTP

Hi Everyone, We are migrating from FTP to SFTP. We used the following script for FTP: echo "ftp -np -i -v << EOF" >> ${FTP_READY_FILE} echo "open ${SRC_FTP_SERVER} " >> ${FTP_READY_FILE} echo "user ${SRC_FTP_USER} ${SRC_FTP_PWD}" >> ${FTP_READY_FILE} echo "binary" >> ${FTP_READY_FILE}... (5 Replies)
Discussion started by: Jigsaw16
5 Replies

3. UNIX for Dummies Questions & Answers

Replace FTP with SFTP

Hi All, I am in the process of replacing SFTP instead of FTP to make data more secure. In one of my FTP script I have Quote Site command. I would like to know, what is the option to replace this in SFTP ftp -n -v <<! | tee -a $LOG | grep "Transfer complete" >/dev/null open... (3 Replies)
Discussion started by: desai.vishnu
3 Replies

4. Solaris

Why is sftp working but ftp not

I am not very familiar with the use of FTP, and trying to run it I found out that standard "ftp" is not working" but "sftp" is. If sftp is allowed will that block ftp ? and if so where is this set ? I thought there is no relationship, is that right ? If so look here: inetadm | grep ftp enabled... (11 Replies)
Discussion started by: manni2
11 Replies

5. Shell Programming and Scripting

script from ftp to sftp

salmo allikm warhmat allah wabrakato i have my own server and upload file with ftp with this script ftp -n xxxxxxxxxcom<<EOF user xxxx xxxx binary put image bye EOF i want to convert to sftp or secure protocol when change to sftp no respond it stop i don't know how to start ... (7 Replies)
Discussion started by: pua06
7 Replies

6. UNIX for Dummies Questions & Answers

FTP / SFTP confusion

Good morning all, I require some help regarding an FTP server i am building. Basically i have around 20 users all sending a receiving files to and from my FTP server but would like all traffic to be secure. I want to ensure users connect via SFTP only and are denied via FTP. Im using... (1 Reply)
Discussion started by: mokachoka
1 Replies

7. Shell Programming and Scripting

amend ftp to sftp

Hi all, below is my current scriptftp -n << FTPCTRL open $my_ip user $my_user $my_pass ascii prompt off lcd $myDIR cd $ftp_cd $OPS $myfile FTPCTRLI'd like to amend it to sftp mode. Please advise the correct step.I consulted the man pages of sftp and I suppose I should be using the... (1 Reply)
Discussion started by: new2ss
1 Replies

8. Solaris

To make ftp an sftp?

Hi All, I want to make ftp for a particular server(ip ,user/passwd) sftp . Regards Megh (2 Replies)
Discussion started by: megh
2 Replies

9. UNIX for Advanced & Expert Users

FTP commands in SFTP

Hi, I am in the process of migrating all my FTP data flows into SFTP to make data more secure... I have used many quote site commands in our FTP sesssion. In SFTP i found that there is no option to do such commands. Does any body here know to overcome the current situation. Regards,... (2 Replies)
Discussion started by: Astra
2 Replies

10. Cybersecurity

FTP v's SFTP

Hi, I'm being told that I have to start using SFTP from my server (HPUX 11i), so heres a few questions; What are the differences between FTP and SFTP? What differences in congiuration can I expect? Are there any changes in command usage? I did see an earlier thread with command issues. A few... (3 Replies)
Discussion started by: nhatch
3 Replies
Login or Register to Ask a Question