move file from my computer to server using ssh

move file from my computer to server using ssh
LVL 1
rgb192Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.