[SOLVED] Copy a file/folder from local to remote (Mac Terminal)

funnyVillain

New Member
Joined
Feb 8, 2021
Messages
6
Reaction score
0
Credits
59
Hello,

I've been making my first linux experience this very day, because I had to rent a linux server so that I could ran a java program on it.
But unfortunately I haven't been able so far to transfer the jar file / java directory from my local machine to the remote server.
(All I could find, was about the contrary direction from remote to local).

I'm using the Mac terminal. And I don't see how to get back to my mac stuff once I've entered the server root.

Can you help me! Thank you very much in advance!

Greetings,
Chris


-------------------

If I may add this:

I got a Plesk Obsidian user interface to administrate the data on the server. But I can't find any connection between the files and folders I see in the shell and those visible in the user interface. Do you understand that? I'v attached two pictures to show you the "difference". Thanks a lot! (And please forgive me these stupid questions :) )
 

Attachments

  • Bildschirmfoto 2021-02-08 um 16.55.56.png
    Bildschirmfoto 2021-02-08 um 16.55.56.png
    172 KB · Views: 191
  • Bildschirmfoto 2021-02-08 um 17.04.32.png
    Bildschirmfoto 2021-02-08 um 17.04.32.png
    58 KB · Views: 210


In a terminal, you would use scp

scp /path/to/my/file [email protected]:/home
>password: s3cr3tP@$$w0rd

Notice the "/home" at the end of the command. You'll have to specify where you want the file to go.
Usually this will be somewhere under your home directory, as only root has permission to put
files almost everywhere else.
 
Code:
[email protected]'s password:
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0 x86_64)

* Documentation:  https://help.ubuntu.com
* Management:     https://landscape.canonical.com
* Support:        https://ubuntu.com/advantage
Last login: Mon Feb  8 17:27:44 2021 from 80.140.124.21

This server is powered by Plesk.

Run the 'plesk login' command and log in by browsing either of the links received in the output.
Use the 'plesk' command to manage the server. Run 'plesk help' for more info.

root@h1212121       //?!//         :~# scp /Users/xxx/Untitled1.ipynb [email protected]:/test_directory
[email protected]'s password:
Permission denied, please try again.


Thank you, dos2unix!
There's still a problem as you see. I don't know why, but the password, that worked in the beginning for access to the server (or didn't it?), doesn't work for the scp operation (I tried it hundred times ...).
Do you see the problem?

(Why isn't the root number in the left the same as the server's?? ...)

Have a nice evening!

Chris
 
Last edited:
The problem was a confusion between the user's and the root's password ... Thanks! :)
 

Staff online

Members online


Top