01-14-2010
'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.
10 More Discussions You Might Find Interesting
1. Cybersecurity
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
2. UNIX for Advanced & Expert Users
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
3. Solaris
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
4. Shell Programming and Scripting
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
5. UNIX for Dummies Questions & Answers
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
6. Shell Programming and Scripting
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
7. Solaris
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
8. UNIX for Dummies Questions & Answers
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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
LEARN ABOUT PHP
ssh2_sftp_lstat
SSH2_SFTP_LSTAT(3) 1 SSH2_SFTP_LSTAT(3)
ssh2_sftp_lstat - Stat a symbolic link
SYNOPSIS
array ssh2_sftp_lstat (resource $sftp, string $path)
DESCRIPTION
Stats a symbolic link on the remote filesystem without following the link.
This function is similar to using the lstat(3) function with the ssh2.sftp:// wrapper in PHP 5 and returns the same values.
PARAMETERS
o $sftp
-
o $path
- Path to the remote symbolic link.
RETURN VALUES
See the documentation for stat(3) for details on the values which may be returned.
EXAMPLES
Example #1
Stating a symbolic link via SFTP
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$sftp = ssh2_sftp($connection);
$statinfo = ssh2_sftp_lstat($sftp, '/path/to/symlink');
$filesize = $statinfo['size'];
$group = $statinfo['gid'];
$owner = $statinfo['uid'];
$atime = $statinfo['atime'];
$mtime = $statinfo['mtime'];
$mode = $statinfo['mode'];
?>
SEE ALSO
ssh2_sftp_stat(3), lstat(3), stat(3).
PHP Documentation Group SSH2_SFTP_LSTAT(3)