简体   繁体   中英

Copy file from local machine to remote machine

I have a pretty novice question, but I'm really out of resources right now.

I'm trying to send a script to a remote machine. This script is in my local machine and it's called model.py.

I can access the remote machine by typing ssh csousa@headtop.ncc.unesp.br (the remote machine knows my public key)

I read about the usage of the scp and rsync commands. I tried:

rsync -v -e ssh /home/ecaue/ParticlePhysics/TCC/model.py csousa@headtop.ncc.unesp.br

and

    scp -r csousa@headtop.ncc.unesp.br /home/ecaue/ParticlePhysics/TCC/model.py

but what I get is just a copy of my original file with another name ("csousa@headtop.ncc.unesp.br") in the same folder of my original file (like a clone with a different name).

I can access the remote machine and create conda environments and all kind of stuff(install tensorflow, keras,etc), but I'm not able to send my scrip and my dataset.

I would really appreciate any help!!

The scp command should be:

scp PATH_TO_YOUR_SCRIPT/SCRIPT_NAME user@host:DESTINATION_PATH

So in you case:

scp /home/ecaue/ParticlePhysics/TCC/model.py csousa@headtop.ncc.unesp.br:$HOME

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM