SFTP Password Problem

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Dec 2, 2008
209
2
Canada
#1
Hi,

The documentation for SFTP says:

***
You can also specify an explicit username and password on the command line:

ftp://[username:password@]ftp.abc.com/...

If you specify a password of *, you will be prompted to enter the password (which will appear on the screen as asterisks).
***

But using "username:*" doesn't work, while "username: password" does. When I type in the password and hit return I just get another prompt for the password.

I am using TCC 13.04.63

Craig

Update:
IFTP /P /V sftp://[username:*@]ftp.abc.com/

This seems to work, but

sftp://[username:*@]ftp.abc.com/

does not work.
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#2
But using "username:*" doesn't work, while "username: password" does. When I type in the password and hit return I just get another prompt for the password.
It does work, but it depends on what you're doing. Something like a MD / RD / DEL / REN will work, because those are single operations. Something like a DIR requires calling the SFTP connection routine for more than a dozen logon / logoffs (more if you use /S), and the SFTP routine doesn't know when it's safe to reuse the password.

An IFTP saves the password for the initial connection, so it never needs to ask again because the connection isn't closed until a /C. (And IFTP is far, far, faster than trying to do something like a "dir sftp://...".)