SCP with password authentication only doesn't ask me for password

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I'm trying to copy files from one server to another with scp.



On both servers, I configured ssh port to 222. sshd_config for both servers is exactly the same (no RootLogin, PasswordAuthentication enabled)



For many reasons too long to explain here, I can't use key authentication.



When I use scp to copy from server A to server B (logged to A), it works. But it doesn't work when I'm doing the same thing from B to A (logged to B) : I get an error message "permission denied" and scp doesn't ask me for password (although the password authentication is enabled)



Here is the command I use (logged on server B) :



scp -P 222 -vvv ~/backup/file user@serverA:/home/user/backup


And here are the last lines of the output :



debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: password
debug3: start over, passed a different list password
debug3: preferred publickey,keyboard-interactive
debug1: No more authentication methods to try.
user@serverA: Permission denied (password).


Why doesn't scp ask me for password, whereas "password" is enabled (as it is written in the 2nd "debug1" line) ?



Thank you.










share|improve this question







New contributor




Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • You sure that PW auth for user is enabled? If I try this with PW and -vvv I get this output: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51
    – Lenniey
    3 hours ago














up vote
1
down vote

favorite












I'm trying to copy files from one server to another with scp.



On both servers, I configured ssh port to 222. sshd_config for both servers is exactly the same (no RootLogin, PasswordAuthentication enabled)



For many reasons too long to explain here, I can't use key authentication.



When I use scp to copy from server A to server B (logged to A), it works. But it doesn't work when I'm doing the same thing from B to A (logged to B) : I get an error message "permission denied" and scp doesn't ask me for password (although the password authentication is enabled)



Here is the command I use (logged on server B) :



scp -P 222 -vvv ~/backup/file user@serverA:/home/user/backup


And here are the last lines of the output :



debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: password
debug3: start over, passed a different list password
debug3: preferred publickey,keyboard-interactive
debug1: No more authentication methods to try.
user@serverA: Permission denied (password).


Why doesn't scp ask me for password, whereas "password" is enabled (as it is written in the 2nd "debug1" line) ?



Thank you.










share|improve this question







New contributor




Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • You sure that PW auth for user is enabled? If I try this with PW and -vvv I get this output: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51
    – Lenniey
    3 hours ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm trying to copy files from one server to another with scp.



On both servers, I configured ssh port to 222. sshd_config for both servers is exactly the same (no RootLogin, PasswordAuthentication enabled)



For many reasons too long to explain here, I can't use key authentication.



When I use scp to copy from server A to server B (logged to A), it works. But it doesn't work when I'm doing the same thing from B to A (logged to B) : I get an error message "permission denied" and scp doesn't ask me for password (although the password authentication is enabled)



Here is the command I use (logged on server B) :



scp -P 222 -vvv ~/backup/file user@serverA:/home/user/backup


And here are the last lines of the output :



debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: password
debug3: start over, passed a different list password
debug3: preferred publickey,keyboard-interactive
debug1: No more authentication methods to try.
user@serverA: Permission denied (password).


Why doesn't scp ask me for password, whereas "password" is enabled (as it is written in the 2nd "debug1" line) ?



Thank you.










share|improve this question







New contributor




Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm trying to copy files from one server to another with scp.



On both servers, I configured ssh port to 222. sshd_config for both servers is exactly the same (no RootLogin, PasswordAuthentication enabled)



For many reasons too long to explain here, I can't use key authentication.



When I use scp to copy from server A to server B (logged to A), it works. But it doesn't work when I'm doing the same thing from B to A (logged to B) : I get an error message "permission denied" and scp doesn't ask me for password (although the password authentication is enabled)



Here is the command I use (logged on server B) :



scp -P 222 -vvv ~/backup/file user@serverA:/home/user/backup


And here are the last lines of the output :



debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: password
debug3: start over, passed a different list password
debug3: preferred publickey,keyboard-interactive
debug1: No more authentication methods to try.
user@serverA: Permission denied (password).


Why doesn't scp ask me for password, whereas "password" is enabled (as it is written in the 2nd "debug1" line) ?



Thank you.







ssh scp






share|improve this question







New contributor




Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 4 hours ago









Harkonnen

1082




1082




New contributor




Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Harkonnen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • You sure that PW auth for user is enabled? If I try this with PW and -vvv I get this output: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51
    – Lenniey
    3 hours ago
















  • You sure that PW auth for user is enabled? If I try this with PW and -vvv I get this output: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51
    – Lenniey
    3 hours ago















You sure that PW auth for user is enabled? If I try this with PW and -vvv I get this output: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51
– Lenniey
3 hours ago




You sure that PW auth for user is enabled? If I try this with PW and -vvv I get this output: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51
– Lenniey
3 hours ago










1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










The best solution would be to ask the person who disabled publickey authentication on that server why and then go fix that. Using publickey authentication is more convenient and more secure than passwords.



The reason authentication fails for you is that no authentication method is enabled on both client and server. The authentication methods enabled on the server are:



debug1: Authentications that can continue: password


And the authentication methods enabled on the client are:



debug3: preferred publickey,keyboard-interactive


You can pass -o PreferredAuthentications=password to scp to only use password authentication.






share|improve this answer
















  • 1




    You're my man! "UsePasswordAuthentication" was set to "No" in ssh_config on server B. Corrected it to "yes", and it's ok. Thanks a lot.
    – Harkonnen
    2 hours ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Harkonnen is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f931993%2fscp-with-password-authentication-only-doesnt-ask-me-for-password%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
4
down vote



accepted










The best solution would be to ask the person who disabled publickey authentication on that server why and then go fix that. Using publickey authentication is more convenient and more secure than passwords.



The reason authentication fails for you is that no authentication method is enabled on both client and server. The authentication methods enabled on the server are:



debug1: Authentications that can continue: password


And the authentication methods enabled on the client are:



debug3: preferred publickey,keyboard-interactive


You can pass -o PreferredAuthentications=password to scp to only use password authentication.






share|improve this answer
















  • 1




    You're my man! "UsePasswordAuthentication" was set to "No" in ssh_config on server B. Corrected it to "yes", and it's ok. Thanks a lot.
    – Harkonnen
    2 hours ago














up vote
4
down vote



accepted










The best solution would be to ask the person who disabled publickey authentication on that server why and then go fix that. Using publickey authentication is more convenient and more secure than passwords.



The reason authentication fails for you is that no authentication method is enabled on both client and server. The authentication methods enabled on the server are:



debug1: Authentications that can continue: password


And the authentication methods enabled on the client are:



debug3: preferred publickey,keyboard-interactive


You can pass -o PreferredAuthentications=password to scp to only use password authentication.






share|improve this answer
















  • 1




    You're my man! "UsePasswordAuthentication" was set to "No" in ssh_config on server B. Corrected it to "yes", and it's ok. Thanks a lot.
    – Harkonnen
    2 hours ago












up vote
4
down vote



accepted







up vote
4
down vote



accepted






The best solution would be to ask the person who disabled publickey authentication on that server why and then go fix that. Using publickey authentication is more convenient and more secure than passwords.



The reason authentication fails for you is that no authentication method is enabled on both client and server. The authentication methods enabled on the server are:



debug1: Authentications that can continue: password


And the authentication methods enabled on the client are:



debug3: preferred publickey,keyboard-interactive


You can pass -o PreferredAuthentications=password to scp to only use password authentication.






share|improve this answer












The best solution would be to ask the person who disabled publickey authentication on that server why and then go fix that. Using publickey authentication is more convenient and more secure than passwords.



The reason authentication fails for you is that no authentication method is enabled on both client and server. The authentication methods enabled on the server are:



debug1: Authentications that can continue: password


And the authentication methods enabled on the client are:



debug3: preferred publickey,keyboard-interactive


You can pass -o PreferredAuthentications=password to scp to only use password authentication.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









kasperd

24.4k104593




24.4k104593







  • 1




    You're my man! "UsePasswordAuthentication" was set to "No" in ssh_config on server B. Corrected it to "yes", and it's ok. Thanks a lot.
    – Harkonnen
    2 hours ago












  • 1




    You're my man! "UsePasswordAuthentication" was set to "No" in ssh_config on server B. Corrected it to "yes", and it's ok. Thanks a lot.
    – Harkonnen
    2 hours ago







1




1




You're my man! "UsePasswordAuthentication" was set to "No" in ssh_config on server B. Corrected it to "yes", and it's ok. Thanks a lot.
– Harkonnen
2 hours ago




You're my man! "UsePasswordAuthentication" was set to "No" in ssh_config on server B. Corrected it to "yes", and it's ok. Thanks a lot.
– Harkonnen
2 hours ago










Harkonnen is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Harkonnen is a new contributor. Be nice, and check out our Code of Conduct.












Harkonnen is a new contributor. Be nice, and check out our Code of Conduct.











Harkonnen is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f931993%2fscp-with-password-authentication-only-doesnt-ask-me-for-password%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

Confectionery