SCP Remote Download Error

Sorry to bother. I am remotely connected to a terminal and wish to copy some files from the remote server to a local computer (my laptop). The code I used, with me modifying the actual address for privacy reasons is

*scp username@dragon.us:/disk/home/yforall/simple/plots/N_ /home/me/Desktop/Ham/ **

I am then prompted to enter a password, and when I do this correctly, I am given an error message as follows:

**/home/me/Desktop/Ham/: No such file or directory
**
The issue is that this directory does exist. I just made it on my desktop, and I can enter this folder locally. Does anyone have any suggestions?

Hi
It’s;


scp <local_file> user@host:<already_at_the_user_dir>/directory/<local_file>
scp *.txt user@host:
scp simple/plots/N_* [EMAIL="username@dragon.us"]username@dragon.us[/EMAIL]:/home/me/Desktop/Ham/
scp simple/plots/N_* [EMAIL="username@dragon.us"]username@dragon.us[/EMAIL]:Desktop/Ham/

Still doesn’t work. Tried your code, but this looks like I am taking a local file and copying it to a remote server. I want to copy a file on the remote server and save it to a local folder. I get the same error message, namely that the directory does not exist!

Maybe try cd to your desired target location and then copy to “here”

As follows

cd /home/Desktop/Ham/
scp username@dragon.us:/disk/home/yforall/simple/plots/N_* .

If that doesn’t work, perhaps check the local directory write permissions?

Also, which Desktop are you running?
Although I haven’t seen on openSUSE in a long time, some Desktops have weird permissions on the Desktop directory, so your creating a sibdirectory on the Desktop might have inherited some weiirdness.
You can try downloading to subdirectory of Documents or Downloads instead.

TSU

That code won’t even let me complete it because of the fact that scp requires two arguments. Furthermore, I have to be logged into the server I am copying from, as this is a security feature. The issue is the folder not being recognized on my computer, which I find strange. I am running KDE by the way. I had the file originally going to my Documents folder, but that was still an issue! Same error message.

Hi
OK, vis-versa also works fine here… so as user tsu2 indicated, maybe the security in place only allows ssh?


scp user@remotehost:mbpfan-2.0.0-0.x86_64.rpm .
mbpfan-2.0.0-0.x86_64.rpm                                                                                                            100%   27KB  27.2KB/s   00:00 

scp user@remotehost:mbpfan-2.0.0-0.x86_64.rpm Documents/
mbpfan-2.0.0-0.x86_64.rpm                                                                                                            100%   27KB  27.2KB/s   00:00

Localhost openSUSE Leap 42.3 remote host Tumbleweed.

What OS is the remote host?

Hi
Another thought, since you can ssh to the remote machine, can you then ssh back to your local machine?

You probably can’t see it unless you look <very> closely… There is a space followed by a period.
So, there <is> a defined target.

If you copy the <entire line> you’ll find that the command is complete syntactically.

TSU

copy and paste your actual command and its output (including final shell prompt).

The following is the actual output of the code that I feel should work. Only two usernames were changed for security purposes, and they are now ‘username’ and ‘me’. The rest is the verbatim actual output.

[username@hamilton2 GRAPHS]$ scp username@hamilton.dur.ac.uk:/ddn/home/username/Sinh_gordon/GRAPHS/N_* /home/me/Desktop/Hamilton/
username@hamilton.dur.ac.uk’s password:
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory
/home/me/Desktop/Hamilton/: No such file or directory

On 11/10/2017 10:56 PM, morrison27 wrote:
>
> tsu2;2844572 Wrote:
<snip>
>
>
> That code won’t even let me complete it because of the fact that scp
> requires two arguments. Furthermore, I have to be logged into the
> server I am copying from, as this is a security feature. The issue is
> the folder not being recognized on my computer, which I find strange. I
> am running KDE by the way. I had the file originally going to my
> Documents folder, but that was still an issue! Same error message.
>
>

scp is like any other copy command, it’s always:

code:


<copy command> source destination


In your case it would be:

code:


scp <file to be copied> <remote computer:path to directory>


Supply your passwd and the copy should complete.


Ken
linux since 1984
S.u.S.E./openSUSE since 1996

On 11/11/2017 08:26 AM, morrison27 wrote:
>
> arvidjaar;2844583 Wrote:
>> copy and paste your actual command and its output (including final
>> shell prompt).
>
>
>
> The following is the actual output of the code that I feel should work.
> Only two usernames were changed for security purposes, and they are now
> ‘username’ and ‘me’. The rest is the verbatim actual output.
>
>
>
> [username@hamilton2 GRAPHS]$ scp
> username@hamilton.dur.ac.uk:/ddn/home/username/Sinh_gordon/GRAPHS/N_*
> /home/me/Desktop/Hamilton/
> username@hamilton.dur.ac.uk’s password:
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
> /home/me/Desktop/Hamilton/: No such file or directory
>
>

Does the folder “Hamilton” actually exist? The error indicates it does not.


Ken
linux since 1984
S.u.S.E./openSUSE since 1996

Amazing how many ways I can be misunderstood…
The “copy” I meant was a regular local file operation to grab the entire statement, not “copy” as part of the scp operation.

Try this…
viewing the code block I provided, increase the font size or magnification to something like 800% or more.
You’ll see the end of the statement that specifies the target.

Or, here… Let me red bold the part I’m talking about which specifies the target

scp username@dragon.us:/disk/home/yforall/simple/plots/N_*** .  
**

TSU

On Sat 11 Nov 2017 03:16:02 PM CST, tsu2 wrote:

Amazing how many ways I can be misunderstood…
The “copy” I meant was a regular local file operation to grab the entire
statement, not “copy” as part of the scp operation.

Try this…
viewing the code block I provided, increase the font size or
magnification to something like 800% or more.
You’ll see the end of the statement that specifies the target.

Or, here… Let me red bold the part I’m talking about which specifies
the target

Code:

scp username@dragon.us:/disk/home/yforall/simple/plots/N_** .
*

TSU

Hi
Also add some verbosity to see what’s happening…


scp -vvv <your commands>


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.92-18.36-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hi,

If you quote the glob does that help? but yeah like what was suggested add the -v flag to be more verbose when running scp.

scp -v 'username@dragon.us:/disk/home/yforall/simple/plots/N_*' /home/me/Desktop/Ham/

Right after you re-posted this, I figured out what I was doing wrong. I wanted to copy files from my remote server to my local machine. I logged in remotely to my remote server, but I issued the correct command on the remote server itself! Thus, on the remote server, of course it wasn’t finding my local machine path on the system! So my original code works if I correctly entered it in the appropriate space. This one would undoubtedly work as well. No wonder I was perplexed as to why this wasn’t completing! Sorry guys, the last 24 hours have been the first time I worked with a remote server and desktop!

Glad to hear you figured it out.

TSU

On 11/11/2017 11:16 PM, morrison27 wrote:
>
> tsu2;2844627 Wrote:
>> Amazing how many ways I can be misunderstood…
>> The “copy” I meant was a regular local file operation to grab the entire
>> statement, not “copy” as part of the scp operation.
>>
>> Try this…
>> viewing the code block I provided, increase the font size or
>> magnification to something like 800% or more.
>> You’ll see the end of the statement that specifies the target.
>>
>> Or, here… Let me red bold the part I’m talking about which specifies
>> the target
>>
>>>
> Code:
> --------------------
> > > scp username@dragon.us:/disk/home/yforall/simple/plots/N_** .
> > *
> --------------------
>>>
>>
>> TSU
>
>
>
> Right after you re-posted this, I figured out what I was doing wrong. I
> wanted to copy files from my remote server to my local machine. I
> logged in remotely to my remote server, but I issued the correct command
> on the remote server itself! Thus, on the remote server, of course it
> wasn’t finding my local machine path on the system! So my original code
> works if I correctly entered it in the appropriate space. This one
> would undoubtedly work as well. No wonder I was perplexed as to why
> this wasn’t completing! Sorry guys, the last 24 hours have been the
> first time I worked with a remote server and desktop!
>
>

That’s alright we’ve all been there.


Ken
linux since 1984
S.u.S.E./openSUSE since 1996