Ubuntu18.04 SSH & scp 远程传输文件到服务器

software prepation:

  • Ubuntu18.04
  • ssh
  • putty

config steps:

step 1 :open ssh

sudo service ssh start

step 2 :open putty

$:putty

set servieport: ******* for service
set username: ***
set password: ***
step 3 : create empty in service user/somefolder

#:mkdir somefolder

step 4 : set the authority for somefolder

#:chmod 766 /home/user/somefolder

step 5 : upload linux file to service

$:sudo scp /../file -r username@serviceport:/home/user/somefolder

step 6 : run the program in service

#:cd /home/user/somefolder/***.py

step 7 : remove the source file from service

#:rm ...py
#:rmdir somefolder

Note:

        '$' and '#' is used to distinguish the linux user and service user

你可能感兴趣的:(linux)