Topic "Unable to authenticate sftp password using command line"

Author Message
ykmohank
[View user's profile]

Joined: 2013-01-06
Posts: 6
Hi,

I able to connect to my sftp server using Graphical user interface of WinSCP by providing the user name and password.

But when i try to connect using the following statement

open sftp://<<username>>:<<password>>@<<servername>>:<<portnumber>>

in the command prompt i am getting the error message saying that the "User Authentication Failed"
But the same username and password is working in case if i use the Graphical User Interface.

Please help.

My assignment is i need to automate the task of sending files using sftp.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Please compare session log files for both scenarios.

If you won't find the difference, please attach the logs here.
ykmohank
[View user's profile]

Joined: 2013-01-06
Posts: 6
Hi,

I am tying to connect to the sftp using the following statements

option batch on
option confirm off
open sftp://<<username>>:<<password>>@<<servername>> -HOSTKEY="ssh-rsa 2048 29:7d:c6:64:25:c6:07:2c:9b:7e:92:18:04:2e:c8:1a"

attached is the session.log file please look into that and let me know where exactly i am doing wrong.

Please help.
session.log (4.29 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
The error message is "Access denied". Possibly you have some special characters in the password or username.
Please read
https://winscp.net/eng/docs/session_url
ykmohank
[View user's profile]

Joined: 2013-01-06
Posts: 6
Its working Thanks
ATCHERE
[View user's profile]

Joined: 2013-01-29
Posts: 3
prikryl wrote:
The error message is "Access denied". Possibly you have some special characters in the password or username.
Please read
https://winscp.net/eng/docs/session_url



The password I have been given has special character. I can get Filezilla to work using this password but WINSCP failes with "Access Denied". I use the open sftp://username:password@hostname format where password is tt4f!?QQ
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I do not think that password needs any special handling. Can you connect from WinSCP GUI using the password?
ATCHERE
[View user's profile]

Joined: 2013-01-29
Posts: 3
prikryl wrote:
I do not think that password needs any special handling. Can you connect from WinSCP GUI using the password?


NO i get the same Authentication failed then an "Access Denied" message using both the WINSCP GUI and the batch process.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Please attach log file from GUI of both WinSCP and Filezilla using the latest versions.
DavidFusion

Guest


prikryl wrote:
The error message is "Access denied". Possibly you have some special characters in the password or username.
Please read
https://winscp.net/eng/docs/session_url


Hi,

I'm using WinSCP on virtual Windows XP trying to connect to a Ubuntu 12.04 host. I've had this working before but for some reason I am now receiving an access denied error.

I've made sure that I don't have any special characters in my password.

Please help.

Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
DavidFusion wrote:
I'm using WinSCP on virtual Windows XP trying to connect to a Ubuntu 12.04 host. I've had this working before but for some reason I am now receiving an access denied error.

Please start here:
https://winscp.net/eng/docs/message_access_denied
_________________
Martin Prikryl
Noobcanon

Guest


I had the same problem and I fixed it by taking out certain special characters in my password. For some reason it doesn't like the pound (£) symbol. Would be nice to know what is/isn't accepted by WinSCP.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Noobcanon wrote:
I had the same problem and I fixed it by taking out certain special characters in my password. For some reason it doesn't like the pound (£) symbol. Would be nice to know what is/isn't accepted by WinSCP.

It's not about what WinSCP accepts or not (it accepts any character), but rather about WinSCP and the server agreeing on the same encoding. It's better to stick to ASCII characters in the credentials (what a pound sign is not).
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