• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

move file from my computer to server using ssh

move file from my computer to server using ssh
0
rgb192
Asked:
rgb192
  • 7
  • 3
  • 2
  • +1
1 Solution
 
medveddCommented:
scp file user@server:.

It will copy file to home directory of user on server.
0
 
savoneCommented:
Use scp you can do a search on Google for man scp
0
 
nabeelmoiduCommented:
if u r using windows, use winscp
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
rgb192Author Commented:
>>winscp
how does winscp do scp
i used it before and it looks like it does ftp

what is difference between ftp and scp


>>scp file user@server:.
if my computer file is
/usr/file.rar
and server is
 /home/admin/website.com/

what is command to copy
0
 
savoneCommented:
Scp is a subsystem of web and uses an say connection to transfer the files encrypted.
0
 
savoneCommented:
Sorry... scp is a subsystem of ssh
0
 
savoneCommented:
Darn mobile phones, let me try again..

Scp is a subsystem of ssh and uses an encrypted ssh connection to transfer files.
0
 
nabeelmoiduCommented:
0
 
medveddCommented:
scp /usr/file.rar user@server:/home/admin/website.com/
0
 
rgb192Author Commented:
i have to connect on port 5743

 scp /usr/file.rar user@server -p 5743:/home/admin/website.com/
ssh: connect to host 5743 port 22: Invalid argument


note: i had my signin name and ip address, but I removed it
0
 
savoneCommented:
scp -P 5743 /usr/file.rar user@server:/home/admin/website.com/

You need a capital P for the port number...

0
 
savoneCommented:
I do not use SCP to often but I just did a test....

$ scp -P 8662 error_log savona@mysite.net:/var/tmp/
savona@mysite.net's password:
error_log                                                                                         100% 7888     7.7KB/s   00:00


Worked! :)

0
 
savoneCommented:
BTW, this can be confusing since ssh uses a lower case -p to specify port number, but the man page shows you...


Taken from scp man pages:

Lower case p:

     -p   Preserves modification times, access times,  and  modes
          from the original file.


Upper case P:

     -P port
          Specifies the port to connect to on  the  remote  host.
          Note  that  this  option is written with a capital `P',
          because -p is already reserved for preserving the times
          and modes of the file in rcp(1).
0
 
rgb192Author Commented:
thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 7
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now