Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting MacOSX and Gentoo x86 computers to talk.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
BennyP
Guru
Guru


Joined: 09 May 2003
Posts: 497
Location: Toronto, Canada

PostPosted: Thu Aug 05, 2004 7:15 am    Post subject: Getting MacOSX and Gentoo x86 computers to talk. Reply with quote

I'd like to be able to share files and resources between my iBook and my Pentium desktopper with gentoo. I have a nice long ethernet cable i can use to connect them, but how do i get them to recognize each other and communicate?
_________________
Could it be?
Back to top
View user's profile Send private message
HighOnBonsai
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 260

PostPosted: Thu Aug 05, 2004 8:02 am    Post subject: Reply with quote

You can use SSH for remote shell and SCP to copy files from one machine to another one (thats what I use most of the time). For this you have to start your SSH-Server by:
Code:
# /etc/init.d/sshd start

and then doing a
Code:
$ ssh username@remote_machine

for a remote shell or
Code:
$ scp localfile [username@]remote_machine:destinationfile

or just
Code:
man ssh
man scp

;-)

Another way is to share directories via NFS (network file system). There a lot of how-tos and instructions how to set up a NFS server and the clients! You also can use NFS to share for example you /usr/portage/distfiles directory to have a single location for all the downloaded packages.

But mostly it depends on what you actually want to do! Just google around or search this great forum!


Christopher
_________________
Are YOU high - on bonsai?
Back to top
View user's profile Send private message
BennyP
Guru
Guru


Joined: 09 May 2003
Posts: 497
Location: Toronto, Canada

PostPosted: Thu Aug 05, 2004 8:25 am    Post subject: Reply with quote

thanks!
I love your avatar/nickname/sig =)
_________________
Could it be?
Back to top
View user's profile Send private message
HighOnBonsai
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 260

PostPosted: Thu Aug 05, 2004 8:52 am    Post subject: Reply with quote

No prob! :-)

Look at:
https://forums.gentoo.org/viewtopic.php?t=206586

:-)
_________________
Are YOU high - on bonsai?
Back to top
View user's profile Send private message
jgombos
n00b
n00b


Joined: 27 Jul 2004
Posts: 64

PostPosted: Thu Aug 05, 2004 2:30 pm    Post subject: Reply with quote

And yet a third way would be to use Samba.

I don't think ssh does file sharing. It only does file transferring as far as I know.
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Thu Aug 05, 2004 5:30 pm    Post subject: Reply with quote

You could use "shfs" to do file sharing over ssh. With this you can mount any directory from any computer where you have ssh-access to. I tried it a couple of days ago and it seems pretty neat, but i never did a lot of testing with it though... so i don't know whether it's suited for what you wanna do.

I'd probably go for NFS, but then you have to make sure that the uids and gids used on both machines map to the same users/groups. (which is annoying :()
Back to top
View user's profile Send private message
BennyP
Guru
Guru


Joined: 09 May 2003
Posts: 497
Location: Toronto, Canada

PostPosted: Sat Aug 07, 2004 12:39 am    Post subject: Reply with quote

so i connected the ethernet port of the iBook to eth0 on my gentoo box with a straight cable, then i turned on my gentoo box and woke up the iBook, logged into gentoo as root, started ssh and did
ssh benny@outoforder
on the ibook

it didnt work

I think i'm missing several key steps here... how do i edit the config files on my gentoo box and ibook so they see each other??
_________________
Could it be?
Back to top
View user's profile Send private message
jgombos
n00b
n00b


Joined: 27 Jul 2004
Posts: 64

PostPosted: Sat Aug 07, 2004 1:39 am    Post subject: Reply with quote

BennyP wrote:
so i connected the ethernet port of the iBook to eth0 on my gentoo box with a straight cable,


That's your first problem. A straight cable is used if you have a switch, router, or hub to go through. A direct port-to-port connection needs a crossover cable.
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Sun Aug 08, 2004 5:23 am    Post subject: Reply with quote

You may also have the best luck specifying IP addresses for the destination box - like so:
Code:

ssh someuser@192.168.1.175


This will circumvent any problems with DNS, Rendezvous/ZeroConf, hosts, or a thousand other factors that affect host name resolution.
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
HighOnBonsai
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 260

PostPosted: Sun Aug 08, 2004 7:27 am    Post subject: Reply with quote

There a A LOT of descriptions of how to set up a network properly in this forum and by "googling around".

As jgombos mentioned: You need a cross-over cable to connect the two computers, but lets consider it works with your cable!

You need to set up the network by assigning IP addresses and BOTH of the IP addresses have to be in the same subnet. You can edit the IP addresses (permanent) in the
Code:
/etc/conf.d/net

file (this is for Gentoo!). Let us consider that eth0 is your ethernet network interface.

Example computer A:
Code:
iface_eth0="192.168.0.1 broadcast 192.168.255.255 netmask 255.255.0.0"


Example computer B:
Code:
iface_eth0="192.168.0.2 broadcast 192.168.255.255 netmask 255.255.0.0"


Computer A and B are in the same subnet, because of their network address and their netmask:
Code:
binary operation (AND):
A: 192.168.0.2 & 255.255.0.0 = 192.168.0.0
B: 192.168.0.2 & 255.255.0.0 = 192.168.0.0


192.168.0.0 is the network address and both have the same network address so they are in the same subnet - so they know that there is a direct connection between them. Otherwise they would try to send the packets to the (default-)router.

To assign names to the IP-addresses for a local network you have two possibilities:
NIS (network information system) and /etc/hosts. NIS is for larger networks and /etc/hosts for small ad-hoc networks. DNS is also a possibilitiy - but for small networks NIS and hosts are better solutions.

To get the two computer know each other you have to edit your /etc/hosts: Add the name and IP address of the OTHER computer.

/etc/hosts of Computer A:
Code:
192.168.0.2     computer_b


/etc/hosts of Computer B:
Code:
192.168.0.1     computer_a


You can tell the computer what system (hosts, DNS, NIS) in what order to use by editing the /etc/nsswitch.conf file - but by default the system uses /etc/hosts FIRST and then DNS

Now bring BOTH ifaces up:
Code:
/etc/init.d/net.eth0 start


And start the SSHD server:
[/code]/etc/init.d/sshd start[/code]

ping the hosts to test and network and then try ssh!

I hope this will help. But I have to tell you that:
1. You have to be more verbose on your problem: Tell the people what you already have set-up and what not (and what you know about your system and what not)
2. There is a lot of description and documentation of "How to set-up a network" around in the internet: read man-pages, search by google, search the forums


Christopher
_________________
Are YOU high - on bonsai?
Back to top
View user's profile Send private message
servobf
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 160

PostPosted: Sun Aug 08, 2004 8:38 am    Post subject: iBook has autosensing ports, no? Reply with quote

I am almost positive that a crossover cable is NOT needed. Macs have autosensing ports, and will work with either cable, right? At least under OSX they will, though I'm pretty sure this is not OS dependent, but port dependent.

If you're only going from your iBook to your Gentoo box, and your iBook has OSX, it's a piece of cake. If not, listen to other people suggestions, but here's what I've done.
1) Turn off your iBook's airport (if applicable)
2) open System prefs --> network, --> Ethernet and assign the IP address manually. Give it a number like 192.168.0.3
3) In gentoo edit /etc/conf.d/net so that your IP address for ethernet will be 192.168.0.4 or something similar (but different than the iBooks!)
4) Restart your eth0 (or whichever is you ethernet port)
5) On the mac, turn on the webserver in System prefs, --> sharing
6) Put documents in /Library/WebServer/Documents
7) On the gentoo box, point a browser at 192.168.0.4 and download the desired files.

~Michael
Back to top
View user's profile Send private message
HighOnBonsai
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 260

PostPosted: Sun Aug 08, 2004 9:14 am    Post subject: Reply with quote

@BennyP: It would also be nice to know if you use Linux on your iBook or Mac OS X?? This is a configuration issue, because ssh/sshd/nfs are also available under Mac OS X!


Christopher
_________________
Are YOU high - on bonsai?
Back to top
View user's profile Send private message
BennyP
Guru
Guru


Joined: 09 May 2003
Posts: 497
Location: Toronto, Canada

PostPosted: Sun Aug 08, 2004 9:47 am    Post subject: Reply with quote

I'm running MacOS on the iBook. I'd like to repartition it and dual boot with Gentoo, but first I will have to either back up the good stuff and reinstall OSX or get a friend who has another mac and a copy of iPartition to do a non-destructive disk operation for me.

Making Progress!!
First I tried just setting the Gentoo box' IP manually and turning off DHCP, but ssh wouldnt work.. then i remembered to turn on sshd, but it still didnt work, THEN i remembered to set iBook's ethernet port IP manually and turn off airport, Now I get successful Ping between the two when airport is off!
From iBook (white)
Code:
white:~ bennyp$ ping outoforder
PING outoforder (192.168.0.2): 56 data bytes
64 bytes from 192.168.0.2: icmp_seq=0 ttl=64 time=0.956 ms
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.507 ms
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=0.512 ms
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=0.467 ms
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=0.492 ms
^C
--- outoforder ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.467/0.586/0.956 ms


I can SSH to my gentoo box! I will try to transfer files when i wake up (its 0614 and i havent slept yet, oh boy!)
Now I want to know how to transfer files from Gentoo box to the iBook.
I could run apache on the gentoo box and point the server to a dir with shared files in it. Another way would be to use ssh to copy files from anywhere on the system (is using ssh to connect to the root account of the gentoo box safe?? i would disconnect airport for sure to do this!)
Also, I'm able to maintain an SSH connection to my gentoo box while Airport is broadcasting. is this safe?? I have the apple firewall running.
_________________
Could it be?
Back to top
View user's profile Send private message
HighOnBonsai
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 260

PostPosted: Sun Aug 08, 2004 10:33 am    Post subject: Reply with quote

SSH is in general very safe - SSH = "Secure Shell". All the data you send and receive is encrypted. So it is safe! I see no problem to maintain a SSH connection while Airport is working! Especially when the firewall is working.


Christopher
_________________
Are YOU high - on bonsai?
Back to top
View user's profile Send private message
BennyP
Guru
Guru


Joined: 09 May 2003
Posts: 497
Location: Toronto, Canada

PostPosted: Mon Aug 09, 2004 5:59 pm    Post subject: Reply with quote

Here's another Question: Can I Share audio between these two machine using only one set of speakers?? Or will I have to just plug in another pair?
_________________
Could it be?
Back to top
View user's profile Send private message
jgombos
n00b
n00b


Joined: 27 Jul 2004
Posts: 64

PostPosted: Mon Aug 09, 2004 6:13 pm    Post subject: Reply with quote

BennyP wrote:
Here's another Question: Can I Share audio between these two machine using only one set of speakers?? Or will I have to just plug in another pair?


You can, but it will be ugly. You need to set up a streaming radio server, and get one of your machines to play your local station through those speakers. From there, any of your machines can broadcast to the server using a broadcast client that emulates a soundcard.

I've done this on a Wintel box, but I'm not sure what tools exist to do all this on your platforms.
Back to top
View user's profile Send private message
BennyP
Guru
Guru


Joined: 09 May 2003
Posts: 497
Location: Toronto, Canada

PostPosted: Mon Aug 09, 2004 6:36 pm    Post subject: Reply with quote

Is your method suitable for Sound production or live performance?
_________________
Could it be?
Back to top
View user's profile Send private message
jgombos
n00b
n00b


Joined: 27 Jul 2004
Posts: 64

PostPosted: Mon Aug 09, 2004 6:53 pm    Post subject: Reply with quote

BennyP wrote:
Is your method suitable for Sound production or live performance?


I would say not. Even if you had a flawless network that didn't drop packets, switching from one broadcaster to another would be abrupt.

For sound production and live performance you need a mixer with each computer connected to a channel on the mixer. It's reliable and you can crossfade one source to another seemlessly.
Back to top
View user's profile Send private message
ozonator
Guru
Guru


Joined: 11 Jun 2003
Posts: 591
Location: Ontario, Canada

PostPosted: Tue Aug 10, 2004 9:36 pm    Post subject: Re: iBook has autosensing ports, no? Reply with quote

servobf wrote:
I am almost positive that a crossover cable is NOT needed. Macs have autosensing ports, and will work with either cable, right? At least under OSX they will, though I'm pretty sure this is not OS dependent, but port dependent.


Since no one's followed up on this here: this is correct. A crossover isn't needed, and it isn't OS dependent. Any relatively recent Apple *book should have an ethernet port that allows a person to use either a regular or crossover cable, in any situation.

As an example: my iBook (800 MHz G3, running Gentoo) is often connected with a straight-through cable directly to my desktop, which doesn't have an auto-sensing ethernet port -- no problems at all. The only thing I notice is that if I wake the iBook from sleep with the cable plugged in, it takes around 20-30 seconds before networking works again; I don't know if that's the time it takes for the iBook's card to "figure out" it's connected directly to another ethernet card without a crossover, but no matter: it works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum