I can't upload files with scp

I have created a new user, as recommended, so as not to use root.
but when I want to use scp to upload a file, it asks me for the sudo password, and then for a password "Here I don't know what password to enter, whether the sudo password or the ssh password to enter the server", in any case put the from sudo or ssh, exit
Permission denied, please try again.

Can you help me, please.

3 Replies

You'll need to use your root password instead of the non-root user's password. If you don't remember your root password, you can reset it by referring to our guide below:

Beyond that, if you ever need assistance with regaining access to a Linux user account, we have a great community post that goes in depth on how to reset a non-root password:

I was left with doubts and let me explain: I am trying to upload a file from my PC to the server.
1.- The root password that I should enter is that of my PC,?
2.- Should I be locked with su on my PC?
3.- Should I enter the root password of the server? What did I just change according to the Linode instructions in the link sent?
4.- If I use sudo spc, it asks me for the password, if I use only spc, it asks for the ssh key.
In any case, with none of the methods used I can upload the files, it always says: Permission denied

[Solved], write permission was given to the directory where the files needed to be uploaded.
Thank you.
Greetings from Chile/Valparaíso


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct