Topic "Command-Line question"

Author Message
Command Line Commando

Guest


Hey, does anybody know why this doesn't work:

"C:\Program Files\WinSCP3\winscp3.exe" sftp://%USERNAME%@my.ssh.server.com

Using the above command line winscp tries to log me in as user "sftp". I think I have the syntax right, and this does work:

"C:\Program Files\WinSCP3\winscp3.exe" %USERNAME%@my.ssh.server.com

The problem with the latter is that it will use whatever protocol is set as the default. Different users have different defaults. I need something like the former to work so that users can connect to Windows OpenSSH servers.



A little background info for the curious: we have several computers in our office including both Linux and Windows systems. I'd like to find a nice generic way of letting people securely move files between them. Thus I have OpenSSH servers running on all of the systems.

On the Windows systems, I've put a menu on the "All Users" Start Menu which has "Transfer files to (this or that computer)" entries. These entries call up WinSCP with the second syntax I gave above. This works fine when connecting to a Linux system, but only works with Windows systems when the user has set SFTP to the default. I'd like to eliminate this issue without changing SSH servers (though I suppose that is an option). Giving out instructions to all of the users is one possibility, but I'd like to avoid that as well... some people won't understand, or will change the default back at a later time and then wonder why things broke.
Command Line Commando

Guest


The problem, of course, was that this feature was only added recently. I must have had 2+ month-old versions of WinSCP installed. Updating them fixed the problem.
Miisha

Guest


I think the problem is that program supposes syntax uname[:password]@host, so when You use sftp://username@host then it is decoded like uname="sftp", password="//username".
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License