Thread: Copying File to server /var/www using ssh on a Desktop?

  1. #1
    POeT GuY Matus's Avatar
    Join Date
    Feb 2008
    Location
    Bz
    Posts
    235

    Question Copying File to server /var/www using ssh on a Desktop?

    I'm new to the server things, anyway its my first try. What i wanted to do was to unzip a wordpress zipped archive file in /var/www but it is corrently located on the Desktop im using to work on the server. I wanted to move the zip file to /var/www and then unzip it there but i cnt figure how to do it. I know basic cp commands but i cnt seem to figure this one out. Can anyone help me out here?

    Thanks!
    Last edited by Matus; 01-27-2009 at 04:50 PM.
    PoEms R InsPiRatiOns of LIfE ExpErienCes!!


  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    So mv moves a file. The file is on the machine you want it on, right? So open up a terminal and navigate to your desktop. (If the file is on your machine and you want it somewhere else, you can sftp it over, I would guess.)

  3. #3
    POeT GuY Matus's Avatar
    Join Date
    Feb 2008
    Location
    Bz
    Posts
    235
    Quote Originally Posted by tabstop View Post
    So mv moves a file. The file is on the machine you want it on, right? So open up a terminal and navigate to your desktop. (If the file is on your machine and you want it somewhere else, you can sftp it over, I would guess.)

    Yea Tabstop its on the Machine's desktop im working on, so i wanted to get it to /etc/var/www but it seems that a simple cp wouldnt work: I got the quote below from yahooanswers which makes sense, but im still a bit confused, so my question would change how to i move the zip file over using ftp then? Can you help me out?

    SSH doesn't work the way it seems you think it does.

    SSH allows you to log into a remote system and execute commands on that computer's shell, but simply executing commands on that computer does not allow you copy files from your computer to that one. The SSH connection you have is essentially a text-only one.

    In order to get the files onto the remote system, you need to use a facility like FTP to transfer the files. From there you can use the shell through SSH to unzip it in the proper location.
    PoEms R InsPiRatiOns of LIfE ExpErienCes!!


  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Let's say you're on sourcemachine, and you want to copy a file from its Desktop to your server (which we'll call targetmachine). You could run a command like this:
    Code:
    $ scp file.ext targetmachine:/var/www
    If you want to login as a specific user on the target machine, you can use
    Code:
    $ scp file.ext username@targetmachine:/var/www
    I hope I've answered your question . . . .
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    POeT GuY Matus's Avatar
    Join Date
    Feb 2008
    Location
    Bz
    Posts
    235
    Quote Originally Posted by dwks View Post
    . .

    Yea Thank you very much DWK, that surely worked, thanks a lot, appreciate it
    PoEms R InsPiRatiOns of LIfE ExpErienCes!!


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  3. text file copying incorrectly
    By IsmAvatar2 in forum C Programming
    Replies: 2
    Last Post: 05-13-2007, 11:23 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. socket question
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 07-19-2002, 01:54 PM