How to copy a file via ssh while already on the server?
I connected via ssh (ssh somename @ somespost)
how can I now copy a file from my local computer to the directory I am currently in?
or do you need some utility?
Answer 1, authority 100%
There is a scp utility
Use it like this:
scp server1: / path to file ~ / path
Example
scp [email protected]: /tmp/1.sql ~ / Downloads / 1.sql
The file will be on your computer in the home directory of the Downloads folder
Answer 2, authority 67%
Use scp :
scp foobar.txt your_username @ remotehost: / some / remote / directory
Answer 3, authority 67%
This is unlikely to work, because your local computer does not have a white IP. But it will turn out, being on the local, copy to the server.
If the local computer is running Linux
Use scp
scp file_name_on_local_computer_user_name_on_server_name @ server_ip: / path_to_folder_on_server
eg
scp readme.txt [email protected]: / home / user / temp
will copy the readme.txt file from the local computer to the server to the Temp folder in the user’s home directory
If the local computer is running Windows
Use winscp This is a two-window application. One will contain your local computer, the other will have a remote server.