I was doing this:
scp aaa.txt $user@$server:~/my-folder/aaa.txt
and it works.
I need something more "common" so i decided to create a specific user and to use a folder in the root path.
scp aaa.txt devuser@$server:/folder/aaa.txt
I receive this error:
Could not chdir to home directory /home/devuser: No such file or directory
I created devuser without the home directory (-M option of useradd) but I want the scp to save the file in the /folder directory that exists and has "devuser" as owner.
I don't understand the error.
SCP can save only on the home directory?
SCP always requires the home directory?
I'm executing SCP from PowerShell but I don't thinkl it's relevant.
[EDIT]
I created the /home/devuser folder with sudo mkdir /home/devuser, so not the user home and the owner is root, and the scp command works.