How Do I Network Two Linux Boxes?

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Re: How Do I Network Two Linux Boxes?

Post by snarkout » Tue Jul 08, 2008 8:04 am

dann wrote:
Snarkout wrote:You know of any good nethood-style file browsers for sshfs? I agree that sshfs is fantastic and use it myself, but the OP made it fairly clear that he's looking for windows style p2p sharing. Also, do you know of any good sshfs printer sharing options?
I do this with konqueror too, all the time. You just connect to a server using sftp and browse it like a local machine.

With samba I have use lineighborhood in the past and have been very please. Although, it's hard not to use the native tools with konqueror or nautilus these days.
While I'd love to use konq for this kind of thing, I've always found it lacking unless all you want to do is browse to a file and copy it to your local drive. IME, sftp:// will allow you to edit a remote file "remotely," but has to copy it locally and then move it back when done (this may be ubiquitous, I don't know, but it's very noticeable with sftp://)- it also constantly bugs you for a password. smb:// is worse in many respects since you simply cannot open files "remotely" at all in many cases - OO.o "opens" but then crashes silently. This is why in any of these situations I much prefer and recommend mounting the filesystem locally - this is how I use sshfs, and I'm surprised there aren't some nice-n-easy sshfs mount tools which are more in the public eye.

My point with that post is that we, as a community, need to stop telling people that they solution they want/need is the wrong one and then suggest in condescending ways that they really need a totally non-1-for-1 tradeoff. Telling people that they're solving the wrong problem is one thing, but telling them that they are misguided for even asking for a standard, well tested, and generally trusted standard is foolish, especially when the solution you propose doesn't fill the requirements. Offer it as an alternative, sure, but browbeating someone with clear-cut requirements for wanting the "wrong thing" is asshattery. SSHFS is fantastic for some applications, and like I've mentioned I use it all the time, but it is in no way a peer-to-peer network filesystem.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Re: How Do I Network Two Linux Boxes?

Post by snarkout » Tue Jul 08, 2008 8:07 am

Oh, I meant to include that fish:// has worked much better for me in the past than sftp:// - at least it doesn't bug me for passwords constantly.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
eddie
Posts: 974
Joined: Wed Sep 05, 2007 10:46 pm
Location: here
Contact:

Re: How Do I Network Two Linux Boxes?

Post by eddie » Tue Jul 08, 2008 9:39 pm

hellonorman wrote:If you are expecting to move large files, as in measured in gigabytes I would recommend samba. They will transfer faster via samba than via ssh.

Interesting. I have had the exact opposite experience.

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Re: How Do I Network Two Linux Boxes?

Post by Jza » Thu Jul 10, 2008 12:33 am

Fergatron wrote:Hi,

I did a search and really just looked at the first two pages of the results. If there is a thread already on this topic, please post it so I can read it.

My issue is, I'd like to know how to network two linux boxes (at home). My wife runs openSUSE and I run Fedora. We've done google searches, etc, but it mostly comes up with a work-type environment scenerio - or am I just missing something.

We are linux noobs so please explain your suggestions... and thank you for your responses. 8)
68
Really easy, if you have KDE on both you can just check your ip by doing
$su
$ifconfig |grep 192
192.182.1.16 <--- suse box example IP

Then on your fedora box (if you have kde) go to fish://user@192.168.1.16

Then it will prompt for a password.

Here are some stuff to watch:
- make sure tha the user is present on your suse box (wife box)
- make sure that u got the 'user' password
- u can only browse the computer as the 'user'

If you want to have a windows like share (non user dependable), then you can use samba.
- make sure u have samba-server on the box u want to share the folder
- make sure u have samba-client on the other box

go to smb:/ to look the boxes in the network.

create a samba user using smbpasswd -U user to add the user to your samba server system.
Alexandro COLORADO

User avatar
btyson
Posts: 24
Joined: Wed Sep 13, 2006 9:39 pm

Re: How Do I Network Two Linux Boxes?

Post by btyson » Sat Jul 12, 2008 12:56 am

Hmm, the previous suggestions are great, but why didn't anyone mention NFS? I think NFS is very easy if you are only doing a few computers at home. For printing, why didn't anyone mention cups? Again, very easy.
Currently running Crunchbang 8.10.02
Mandriva 2008 Spring and Kubuntu 7.04

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Re: How Do I Network Two Linux Boxes?

Post by Jza » Sat Jul 12, 2008 1:29 am

Sure NFS and ZeroConf are also very good, but in the past NFS had some issues with secure authentication and not being as secure. NFS4 seems to be better. But anyway here it goes:

on server, share your directories on the folder:
- sudo vim /etc/export
- Insert:
/home/wife/Documents 192.168.0.1(ro) 192.168.0.2(ro)
/home/wife/Movies 192.168.0.1(rw) 192.168.0.2(rw)
- restart nfs:
/etc/init.d/nfsd restart

On the client:
- make a share directory
mkdir /home/hubby/shares/wife_documents/
- mount the nfs share
mount -t nfs 192.168.0.1:/home/wife/Documents /home/hubby/shares/wife_documents/

if you want this for good
- edit your fstab
vim /etc/fstab
- insert:
192.168.0.1:/home/wife/Documents /home/hubby/shares/wife_documents nfs rw,hard,initr 0 0
Alexandro COLORADO

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Re: How Do I Network Two Linux Boxes?

Post by snarkout » Sat Jul 12, 2008 10:12 am

btyson wrote:Hmm, the previous suggestions are great, but why didn't anyone mention NFS? I think NFS is very easy if you are only doing a few computers at home. For printing, why didn't anyone mention cups? Again, very easy.
Could you expand on "very easy?" I work with NFS daily, but I'm not going to ask someone who is a self-admitted newb to hack around in /etc/exports and /etc/fstab on two boxen. Is there a nice gui front end you'd suggest for the OP?

And personally, I hate cups. There. I said it. It is easily in my top 10 things I hate most about linux with wifi and X11 somewhere very close behind. It isn't just cups config files and the constant permissions issues people have, but the drivers and how they're setup - even the web gui is horrible. Trying to coach someone with an issue in any one of these areas over a telephone is a gross PITA. Once you get cups setup, it's usually pretty solid, but it's something I *dread* about helping people install linux.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Re: How Do I Network Two Linux Boxes?

Post by Jza » Sat Jul 12, 2008 12:05 pm

Snarkout wrote:
btyson wrote:Hmm, the previous suggestions are great, but why didn't anyone mention NFS? I think NFS is very easy if you are only doing a few computers at home. For printing, why didn't anyone mention cups? Again, very easy.
Could you expand on "very easy?" I work with NFS daily, but I'm not going to ask someone who is a self-admitted newb to hack around in /etc/exports and /etc/fstab on two boxen. Is there a nice gui front end you'd suggest for the OP?
Mandriva has one, too bad ur brown OS doesn't :P
btyson wrote:And personally, I hate cups. There. I said it. It is easily in my top 10 things I hate most about linux with wifi and X11 somewhere very close behind. It isn't just cups config files and the constant permissions issues people have, but the drivers and how they're setup - even the web gui is horrible. Trying to coach someone with an issue in any one of these areas over a telephone is a gross PITA. Once you get cups setup, it's usually pretty solid, but it's something I *dread* about helping people install linux.
I learn using cups through SWAT is pretty easy and userfriendly, straight forward and also remotely configurable.
Alexandro COLORADO

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Re: How Do I Network Two Linux Boxes?

Post by snarkout » Sat Jul 12, 2008 3:38 pm

I don't use the brown OS except on my lappy, and even there it's the K version, and I wasn't suggesting that there isn't a GUI, I was asking if there is a good one. Even so, I still don't see a compelling reason to prefer NFS over CIFS on a simple home network.

SWAT is the web frontend for CUPS I was saying sucks - sit a regular user or even a savvy user in front of SWAT and ask them to get their printer working sometime. Better yet, send them to the cups homepage and tell them to look through the FAQs and to make sure they have all the directives in their cupsd.conf and printers.conf files correct. I make use of cups occasionally, and only have the usual linux printing issues, but like I say, it's one of my least favorite things to try to get working for someone else. Sometimes it works easily and flawlessly - laser printers come to mind - other times, though, it requires a lot of work to get working - 99% of recent printers aimed at the home user market come to mind. Also, understand that I'm talking about setting up a print server, not just connecting to a printer - for that I simply tell people to use the fantastic kcontrol wizards.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
eddie
Posts: 974
Joined: Wed Sep 05, 2007 10:46 pm
Location: here
Contact:

Re: How Do I Network Two Linux Boxes?

Post by eddie » Sat Jul 12, 2008 3:43 pm

??? swat is the frontend for samba it think. try localhost:631 for the cups frontend.

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Re: How Do I Network Two Linux Boxes?

Post by Jza » Sat Jul 12, 2008 9:33 pm

eddie wrote:??? swat is the frontend for samba it think. try localhost:631 for the cups frontend.
yes you are right. I got them mixed up.
Alexandro COLORADO

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Re: How Do I Network Two Linux Boxes?

Post by Jza » Sat Jul 12, 2008 9:36 pm

Snarkout wrote:I don't use the brown OS except on my lappy, and even there it's the K version, and I wasn't suggesting that there isn't a GUI, I was asking if there is a good one. Even so, I still don't see a compelling reason to prefer NFS over CIFS on a simple home network..
Because NFS is faster and is easier to configure, you really just need to edit 2 files and there is no need to do sambaclient instructions.

nfs is pretty straightforward just chane 1 line on the server and perform one comand on the client and u are all set. You dont need to deal with users issues etc.
Alexandro COLORADO

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Re: How Do I Network Two Linux Boxes?

Post by snarkout » Sat Jul 12, 2008 10:16 pm

eddie wrote:??? swat is the frontend for samba it think. try localhost:631 for the cups frontend.
Yeah - my bad.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Re: How Do I Network Two Linux Boxes?

Post by snarkout » Sat Jul 12, 2008 10:20 pm

Jza wrote:nfs is pretty straightforward just chane 1 line on the server and perform one comand on the client and u are all set. You dont need to deal with users issues etc.
You might consider including the file change and command for those of us in the dark.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Re: How Do I Network Two Linux Boxes?

Post by Jza » Mon Jul 14, 2008 2:18 am

Snarkout wrote:
Jza wrote:nfs is pretty straightforward just chane 1 line on the server and perform one comand on the client and u are all set. You dont need to deal with users issues etc.
You might consider including the file change and command for those of us in the dark.
Mmmm did you miss my earlier post?
viewtopic.php?p=19917#p19917
Alexandro COLORADO

Post Reply