New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Need some basic terminal commands...


Post Reply New Thread Subscribe

 
Thread Tools
maxf

 
Member Since: Jul 10, 2007
Posts: 1
maxf is on a distinguished road

maxf is offline
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
QUOTE Thanks
Del

 
Member Since: Dec 24, 2006
Location: N. Ireland
Posts: 901
Del has a spectacular aura about
Mac Specs: Mac Pro 2xQuad core 2.8GHZ

Del is offline
ftp ?
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
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.
QUOTE Thanks
danielb
Guest
 
Posts: n/a

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
QUOTE Thanks

Post Reply New Thread Subscribe


« automake and make | Running java »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Basic Terminal Automation Voix OS X - Development and Darwin 3 10-17-2006 03:20 AM
Changing Terminal Colors using Unix Commands? johninc OS X - Development and Darwin 4 05-07-2006 10:14 PM
Automated Terminal Commands sarahsboy18 OS X - Operating System 3 09-09-2005 07:39 PM
useful terminal commands moz Switcher Hangout 4 06-24-2005 11:06 AM
Terminal Help rs2sensen OS X - Apps and Games 1 04-25-2005 10:52 PM

All times are GMT -4. The time now is 02:32 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?