SSH (secure shell) is the fundamental protocol in play. SCP (secure copy) does the copy process once the SSH connection has been established. As such, the SSH server on the system being connected to with the scp command has to be properly configured for starters.
Very common for /etc/ssh/sshd_config to contain PermitRootLogin = no.
Because you said tried to scp and typed root password if you are doing an scp trying to connect to whatever computer as root, you would be denied.
solutions:
- do a simple
ssh connection first instead of using scp and make sure that works for the given usernames. If it does not, then scp under those same parameters will not work. Syntax is ssh username@systemname If successful with ssh username@systemname then doing a corresonding scp username@system://path_to_file/filename /location_on_current_system should work
- possibly modify
/etc/ssh/sshd_config and change PermitRootLogin yes then restart the sshd daemon/service. Typically permitrootlogin=no for security reasons but depending on your environment may be irrelevant. Your call. If you must connect to the computer acting as the ssh server as root, then you need to change this in sshd_config.
also realize if you're logged in as username abc123 then doing
scp othersystem:/path_to_file/filename .
is effectively the same as
scp abc123@othersystem:/path_to_file/filename .
make sure you are connecting using the correct passwords with a valid username.
Also, in case you thing typing the root password trumps the existing password it does not; you have to type the correct password for the given account name being used.
trial.txtlocally?