Unable to authenticate sftp password using command line

Advertisement

ykmohank
Joined:
Posts:
6

Unable to authenticate sftp password using command line

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: Unable to authenticate sftp password using command line

Please compare session log files for both scenarios.

If you won't find the difference, please attach the logs here.

Reply with quote

ykmohank
Joined:
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.

Reply with quote

ATCHERE
Joined:
Posts:
3

an access denied when using a password with special char

martin 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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: an access denied when using a password with special char

I do not think that password needs any special handling. Can you connect from WinSCP GUI using the password?

Reply with quote

ATCHERE
Joined:
Posts:
3

Re: an access denied when using a password with special char

martin 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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: an access denied when using a password with special char

Please attach log file from GUI of both WinSCP and Filezilla using the latest versions.

Reply with quote

DavidFusion
Guest

WinSCP: Access Denied

martin 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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: WinSCP: Access Denied

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

Reply with quote

Noobcanon
Guest

Password cannot contain certain characters

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: Password cannot contain certain characters

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).

Reply with quote

Advertisement

You can post new topics in this forum