LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to? simple peer to peer linux mint intranet (https://www.linuxquestions.org/questions/linux-networking-3/how-to-simple-peer-to-peer-linux-mint-intranet-4175594576/)

keithterrill 12-01-2016 07:32 AM

How to? simple peer to peer linux mint intranet
 
I have tried and failed. I could do this with Windows 7 (and earlier), Tiny Ram, etc. But, I am at a loss in Linux.

I have two computers on my intranet. I can ping one from the other. They both have Linux Mint running.

How do I create a share on Computer-A and mount it as a drive on Computer-B?

I have tried working with SAMBA.

Thank-you.

rtmistler 12-01-2016 07:50 AM

Member Response
 
Hi,

I'm not one who does much for Linux regarding making file sharing via the UI File Manager so that you can browse via a directory share. However there are a couple of things you can do, and it all depends on what types of access work best for you.

You can rlogin to the other machine, or ssh to the other machine - both of these are login terminal types of commands.
You can ftp or sftp, as well as use scp to the other machine - both of these are terminal types of commands as well, although there are some UI based enhanced applications.

What I usually do a lot of are ssh and scp. In my case it's because I'm bringing up development systems and I'm configuring it with a build environment. As a result, I get the network running, and then ssh over to the new machine. Any files I need, I transfer back and forth using scp, or I go to the web if the target machine is to be attached to it.

I do get the impression that you wish to do the first option, which is to share over a file manager where you can grab, cut/copy, and drop files from one machine to another. Samba is one way, as is NFS. I struggle to get those going, but eventually do and then promptly forget how I did it. Quite sure that some others on the forum will reply and provide some help with either of those options. Note that samba is more for sharing between Linux and a windows machine, or at least that's my experience. If you're going between Linux and Linux, I believe NFS is better to use; however both should work.

Turbocapitalist 12-01-2016 08:12 AM

SSH is a good, secure way and allows a lot of other methods on top of it. For example, your file manager (probably Nautilus) can connect over SFTP which goes over SSH. That can be done like this:

On Computer A, install the package openssh-server and open port 22 in that machine's firewall.

On Computer B, open your file manager (probably Nautilus) and go to the location bar (probably ctrl-L). Then type in sftp://a.b.c.d/ where a.b.c.d is the IP address or host name of Computer A.

That's it. Once logged in via the file manager, the remote computer will appear as a folder and its own folders within it. If you have Computer A on the open Internet, then it is a Very Good Idea to use keys for SSH instead of passwords, and turn off passwords.

keithterrill 12-01-2016 06:11 PM

Quote:

Originally Posted by rtmistler (Post 5636646)
Hi,

Samba is one way, as is NFS. ... If you're going between Linux and Linux, I believe NFS is better to use; however both should work.

I have tried to get either Samba or NFS to work. All of the advice I have read appears to not work, or not fully work. I thought Samba would be the best because I could see a time in the future where I may have to pop someone's Windows machine on the net just to work with it. Then I thought NFS would be good because I only intend to use Linux. But, I cannot get either to work.

And, yes, I would like to use the GUI to access the files on the remote computer as if they are on the drive present on the local computer.

thank you for your advice.

keithterrill 12-01-2016 06:35 PM

That worked...
 
Quote:

Originally Posted by Turbocapitalist (Post 5636666)
SSH is a good, secure way and allows a lot of other methods on top of it. For example, your file manager (probably Nautilus) can connect over SFTP which goes over SSH. That can be done like this:

On Computer A, install the package openssh-server and open port 22 in that machine's firewall.

On Computer B, open your file manager (probably Nautilus) and go to the location bar (probably ctrl-L). Then type in sftp://a.b.c.d/ where a.b.c.d is the IP address or host name of Computer A.

That's it. Once logged in via the file manager, the remote computer will appear as a folder and its own folders within it. If you have Computer A on the open Internet, then it is a Very Good Idea to use keys for SSH instead of passwords, and turn off passwords.

Short answer: that worked.

Longer answer:

For those that are looking over my shoulder, the machine's firewall was/is ufw. First, I checked the status.

Code:

sudo ufw status
Computer-A was active, but Computer-B was inactive.

So, first thing I did was to enable the firewall on Computer-B.

Code:

sudo ufw enable
Then on Computer-A I opened port 22 as per Turbocapitalists' advice.

Code:

sudo ufw allow 22
On my Linux Mint the GUI file manager is Nemo. Using the "Connect to Server..." option I was able to enter the IP Address, the type SSH, Folder path, User name and password.... and on the desktop appeared an Icon that opened the mounted folder on the remote computer.

Thank-you...

Addendum:

I applied the process the other was so that I can access files from the other computer too.

Again, great and thank you.


All times are GMT -5. The time now is 01:24 PM.