Home > Enterprise >  copy .sh file from my local computer to the remote server
copy .sh file from my local computer to the remote server

Time:11-14

I have a test.sh file, and I want to copy this file from my local computer to the remote server. How I can do this.? I tried using scp but it does't work, maybe I done something wrong.

Thanks!!

CodePudding user response:

scp user@IP-address:exact-path-of-file-you-want-to-copy . Then the password for remote system

You, the above one or try this

scp your.sh Server-Name@Ip-address:Path-in-Server Password of the Remote system

CodePudding user response:

Imagine hello.txt is the file you want to move. Directory you are standing on contains this file.

Run scp hello.txt root@YOUR_SERVER:/root

This will copy hello.txt to your root's home directory. Run cd ~ on your server and you will see your file.

In this example I used root account, but you can also use another account too

  • Related