07-11-2007, 11:45 AM #1
Need some basic terminal commands...
- Member Since
- Jul 10, 2007
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
07-11-2007, 04:38 PM #2
- Member Since
- Dec 24, 2006
- N. Ireland
- Mac Pro 2xQuad core 2.8GHZ
07-11-2007, 06:22 PM #3
- 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:192.168.1.240:548 remoteservername.com
- 4 is forcing ip4 addressing.
- L is the binding instructions to follow.
- 9548 is the local port you will use to connect to.
- 192.168.1.240 is the real internal address on the remote machine I think.
- 548 is the remote port of the service of interest.
- remoteservername.com 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.
07-22-2007, 01:46 AM #4danielbGuest
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
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By LucasMan in forum OS X - Operating SystemReplies: 6Last Post: 02-25-2015, 04:02 AM
By cjgarof in forum OS X - Operating SystemReplies: 3Last Post: 10-29-2011, 05:42 PM
By ent_matt in forum OS X - Operating SystemReplies: 12Last Post: 07-28-2011, 02:56 PM
By Destructive in forum OS X - Development and DarwinReplies: 11Last Post: 02-19-2008, 09:41 PM
By moz in forum Switcher HangoutReplies: 4Last Post: 06-24-2005, 11:06 AM