Results 1 to 4 of 4
  1. #1

    Member Since
    Jul 10, 2007
    Need some basic terminal commands...
    I did a bunch of Google-ing and came up with nothing. I'm using my Macbook to connect to a remote iMac G3 server via an SSH tunnel. I'm trying to figure out two commands and I've had no luck finding them:

    1. How can I download a certain folder from the remote server to a specified location on my computer?

    2. How can I command the server to download a file from the internet to a specified location on that server?

    Thanks in advance for the help

  2. #2

    Member Since
    Dec 24, 2006
    N. Ireland
    Mac Pro 2xQuad core 2.8GHZ
    ftp ?

  3. #3

    xstep's Avatar
    Member Since
    Jun 25, 2005
    On the road
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    2. Typically you cd to the directory of interest and you a tool such as ftp, curl, sftp. One of these command line tools should do. Afterall, you are getting a terminal connection on the server when you ssh into it.

    1. I'd tar and compress the directory content to /tmp and download that via sftp to your local box.

    A more complicated method to place a friendly face on things is to set up some Appletalk networking when you set up an ssh connection. It involves rerouting port numbers via your ssh command. The server also needs to be sharing Appletalk connections. You then could make a connection to the remote Mac via the Finder and drag&drop files. Some primitive note I have shows me the following connection line. I'm not sure how accurate my notes are as they are from December of 2004.

    ssh -4 -L 9548:

    - 4 is forcing ip4 addressing.
    - L is the binding instructions to follow.
    - 9548 is the local port you will use to connect to.
    - is the real internal address on the remote machine I think.
    - 548 is the remote port of the service of interest.
    - is the internet name or address.

    Then in Finder type Command-K and enter "afp://localhost:9548/" into the server address field, excluding the quotes of course.

  4. #4
    If you are using ssh, you can use the scp (secure copy) command to copy between the machines. Just man scp from the terminal. It should tell you what you need to know.

    An example: to copy foo from your home directory on the remote server to the pwd on the local machine use -

    "scp -r username@server_ip_address:foo ." You'll be prompted for you ssh password for the remote server.

    Hope this helps

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Terminal Commands
    By LucasMan in forum OS X - Operating System
    Replies: 6
    Last Post: 02-25-2015, 05:02 AM
  2. Help with Terminal Commands
    By cjgarof in forum OS X - Operating System
    Replies: 3
    Last Post: 10-29-2011, 06:42 PM
  3. basic terminal commands not working
    By ent_matt in forum OS X - Operating System
    Replies: 12
    Last Post: 07-28-2011, 03:56 PM
  4. Terminal Commands
    By Destructive in forum OS X - Development and Darwin
    Replies: 11
    Last Post: 02-19-2008, 10:41 PM
  5. useful terminal commands
    By moz in forum Switcher Hangout
    Replies: 4
    Last Post: 06-24-2005, 12:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts