[SOLVED] Access one computer from another in home network

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

[SOLVED] Access one computer from another in home network

Post by JerryF »

My HP specs:

Code: Select all

inxi -Fxz
System:    Host: HP-EliteBook-8460p Kernel: 4.15.0-43-generic x86_64 bits: 64 compiler: gcc v: 7.3.0 Desktop: Xfce 4.12.3 
           Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic 
Machine:   Type: Laptop System: Hewlett-Packard product: HP EliteBook 8460p v: A0001D02 serial: <filter> 
           Mobo: Hewlett-Packard model: 161C v: KBC Version 97.4E serial: <filter> BIOS: Hewlett-Packard v: 68SCF Ver. F.65 
           date: 04/06/2017 
Battery:   ID-1: BAT0 charge: 36.5 Wh condition: 37.4/37.4 Wh (100%) model: Hewlett-Packard Primary status: Charging 
CPU:       Topology: Dual Core model: Intel Core i5-2520M bits: 64 type: MT MCP arch: Sandy Bridge rev: 7 L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19955 
           Speed: 798 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 872 2: 816 3: 798 4: 799 
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Hewlett-Packard driver: i915 
           v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.19.6 driver: modesetting unloaded: fbdev,vesa resolution: 1600x900~60Hz 
           OpenGL: renderer: Mesa DRI Intel Sandybridge Mobile v: 3.3 Mesa 18.0.5 direct render: Yes 
Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k4.15.0-43-generic 
Network:   Device-1: Intel 82579LM Gigabit Network vendor: Hewlett-Packard driver: e1000e v: 3.2.6-k port: 4060 
           bus ID: 00:19.0 
           IF: enp0s25 state: down mac: <filter> 
           Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi v: kernel port: 4040 bus ID: 24:00.0 
           IF: wlo1 state: up mac: <filter> 
Drives:    Local Storage: total: 530.98 GiB used: 233.73 GiB (44.0%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 250GB size: 232.89 GiB 
           ID-2: /dev/sdb vendor: Hitachi model: HTS723232A7A364 size: 298.09 GiB 
Partition: ID-1: / size: 18.65 GiB used: 12.29 GiB (65.9%) fs: ext4 dev: /dev/sda1 
           ID-2: /home size: 190.68 GiB used: 149.35 GiB (78.3%) fs: ext4 dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 44.0 C mobo: 0.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 257 Uptime: 29m Memory: 7.70 GiB used: 859.3 MiB (10.9%) Init: systemd runlevel: 5 Compilers: gcc: 7.3.0 
           Shell: bash v: 4.4.19 inxi: 3.0.27
My HP and Gateway computers both have Mint 19.1 Xfce and are networked with a home router. I'm trying to access the Gateway computer from the HP computer. Because Thunar file manager doesn't have a sharing option, I followed this to add it to Thunar https://askubuntu.com/questions/101350/ ... -in-thunar

It creates the share on the Gateway

Code: Select all

net usershare info --long
[shared_public]
path=/home/jim/Public
comment=
usershare_acl=Everyone:F,
guest_ok=y
but after the share is created, I don't know how to access it from the HP.

I looked into NFS and it's complicated.

I'd like to use a linux built-in solution so that I can use file manager. This should be easy, but it doesn't seem to be.

Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Access one computer from another in home network

Post by rene »

The easiest method is setting up SSH and, thus, SFTP access to your "server", the Gateway; no need for SAMBA.

On Gateway, make sure to install and start sshd:

Code: Select all

sudo apt-get install openssh-server
On HP, if you don't yet have a keypair to use for this, generate one with

Code: Select all

ssh-keygen
Accept defaults and feel free to leave the passphrase empty. Copy over the public key to Gateway with, from HP,

Code: Select all

ssh-copy-id gateway.local
in which you'd replace "gateway" with the hostname for, well, Gateway, or replace "gateway.local" with its IP. This should log you in to the same user account on Gateway as you are using on HP (i.e., it's expected to have those be the same) using password, and then copy over the public key. Try to log in in with

Code: Select all

ssh gateway.local
to verify you can now log in without password. At this point terminal based ssh and scp/rsync are available to you.

In Thunar on HP enter sftp://gateway.local/home/jerryf for "jerryf" the correct username into the location bar; this should open a Thunar window to your home directory on Gateway. Navigate one directory up (i.e., to sftp://gateway.local/home) to drag the "jerryf" folder onto the left-hand side places menu so as to create a shortcut for it; rename it e.g. "Gateway" if you care.

Am away immediately after this, so if I forgot a step, please someone else expand. NFS is also by the way exceedingly easy to set up, but the SSH/SFTP method I feel quite nice; SSH access is something you want anyway on a local net.
User avatar
powerwagon75
Level 4
Level 4
Posts: 338
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: Access one computer from another in home network

Post by powerwagon75 »

Jerry,

I agree with rene—sftp is the way to go.

I too fiddled around with getting consistent connections between all my systems, and eventually tried nfs, but never got it to work right. (Could never get smb to work consistently for me either for some reason—operator error? :lol: )

I eventually discovered, that if you have SSH already installed, you can go to your file manager, get the address bar in view, and type in sftp://user@192.168.xxx.xxx. (Username and IP address of the remote system you want to log in to.) A pop up box will show asking for you to login to the remote system. After that, it behaves as any other network drive. I set up bookmarks for each system I remote in to. This works great so far in Nemo and in Nautilus (on Fedora), and for accessing my WIN10 work laptop (but not the other way around—the WIN10 is a enterprise laptop with too many features disabled—but I only need to grab/edit/put back files, so that works for me.)

If you do the steps Rene mentioned, then you shouldn’t have to login after reboots when clicking on one of the remote system bookmarks.
Image
Custom Antec Outside tower w/Mint 20.2
HP lap w/Mint 20.3
Optiplex 960 "Frankenbox" w/Fedora 39/Mint 19.2/Mint 20.2
Advantech TPC-1551T w/LinuxLite
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu
User avatar
Gruppo Sportivo
Level 4
Level 4
Posts: 278
Joined: Sun May 28, 2017 4:14 am
Location: 🇳🇱

Re: Access one computer from another in home network

Post by Gruppo Sportivo »

Is Filezilla perhaps an option,Supports FTP, FTP over SSL/TLS (FTPS) and SSH File Transfer Protocol (SFTP)
Using Filezilla myself to transfer files from PC to a server
User avatar
Gruppo Sportivo
Level 4
Level 4
Posts: 278
Joined: Sun May 28, 2017 4:14 am
Location: 🇳🇱

Re: Access one computer from another in home network

Post by Gruppo Sportivo »

JerryF wrote:I looked into NFS and it's complicated.
rene wrote:NFS is also by the way exceedingly easy to set up
An attempt to explain how you should probably proceed,not sure if it is complete :

To share using NFS you need to install the nfs server: (not entirely sure if this is necessary for you)

Code: Select all

sudo apt-get update
sudo apt-get install nfs-kernel-server
For NFS add a line in fstab to mount the drive under /mnt so that its location and shared name is predictable. First make a directory under /mnt. Lets call it mySharedDrive.

sudo mkdir /mnt/mySharedDrive

Then add a line to fstab like this

UUID=uuidofpartition /mnt/mySharedDrive ext4 defaults,noatime,auto,nofail,x-systemd.mount-timeout=30 0 0

Type blkid at the command prompt to get the value of uuidofpartition.

You need to make a file /etc/exports which will contain lines like this:

/mnt/mySharedDrive 192.168.1.0/24(sync,no_subtree_check)

In the example, the drive mounted at /mnt/mySharedDrive is shared with any device on the 192.168.1.x subnet. Access will be read-only by default. For other sharing options refer to linux documentation for exportfs
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Access one computer from another in home network

Post by altair4 »

but after the share is created, I don't know how to access it from the HP.
I guess I don't understand the question.

Open Thunar, go to Browse Network, and if both systems are running Mint19 your machine will show up automatically.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

Thanks rene. I'll try this when I have some free time. :wink:
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

Thanks powerwagon75. Will follow up on this and let you know.
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

Gruppo Sportivo wrote: Mon Dec 31, 2018 6:15 am
JerryF wrote:I looked into NFS and it's complicated.
rene wrote:NFS is also by the way exceedingly easy to set up
An attempt to explain how you should probably proceed,not sure if it is complete :

To share using NFS you need to install the nfs server: (not entirely sure if this is necessary for you)

Code: Select all

sudo apt-get update
sudo apt-get install nfs-kernel-server
For NFS add a line in fstab to mount the drive under /mnt so that its location and shared name is predictable. First make a directory under /mnt. Lets call it mySharedDrive.

sudo mkdir /mnt/mySharedDrive

Then add a line to fstab like this

UUID=uuidofpartition /mnt/mySharedDrive ext4 defaults,noatime,auto,nofail,x-systemd.mount-timeout=30 0 0

Type blkid at the command prompt to get the value of uuidofpartition.

You need to make a file /etc/exports which will contain lines like this:

/mnt/mySharedDrive 192.168.1.0/24(sync,no_subtree_check)

In the example, the drive mounted at /mnt/mySharedDrive is shared with any device on the 192.168.1.x subnet. Access will be read-only by default. For other sharing options refer to linux documentation for exportfs
This looks very interesting too. I'll try this.

I did install NFS server, but when I followed the instructions on the link I provided, it got into creating scripts, etc. Will try your solution. Thanks.
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

EDITED: double posting
Last edited by JerryF on Tue Jan 01, 2019 11:33 am, edited 1 time in total.
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

altair4 wrote: Mon Dec 31, 2018 8:23 am
but after the share is created, I don't know how to access it from the HP.
I guess I don't understand the question.

Open Thunar, go to Browse Network, and if both systems are running Mint19 your machine will show up automatically.
Both do show, but I kept getting this message:
Shutter_014.jpg
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Access one computer from another in home network

Post by altair4 »

From your other machine ping the gateway machine this way:

Code: Select all

ping -c3 gateway-dx4870.local
Do you get a response?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Access one computer from another in home network

Post by rene »

Not to interfere with altair's help there, but..

I'd find it highly preferable to not use Samba (including from the GUI); to not strap an alien Windows networking protocol onto a UNIX system. NFS is fine and as my own preference is, SFTP is very easy.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Access one computer from another in home network

Post by altair4 »

** Samba is the default file server for Ubuntu.

** Ubuntu actually took some effort with 18.04 to make this as seamless as when two macOS machines ( which also use Samba by default ) connect to each other.

** All of this is being done without any Windows netbios protocols being used.

** The original question was about Samba all I'm trying to do is answer it.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Access one computer from another in home network

Post by rene »

altair4 wrote: Mon Dec 31, 2018 8:48 am Samba is the default file server for Ubuntu.
Yes, well, it's not for Linux...

Please don't get me wrong; just wanted to briefly interject before this turns into a long Samba debugging session, given I feel Samba to not be the best answer to Jerry's original request in the first place. Generally your Samba expertise is much appreciated, also by me personally.
gm10

Re: Access one computer from another in home network

Post by gm10 »

JerryF wrote: Mon Dec 31, 2018 8:32 am Both do show, but I kept getting this message:
How is the gateway set up? Did you modify the smb.conf in any way? Did you even install the samba package (I'm not sure it would even show up on the list without but you never know)? Did you reboot or manually (re)start the smbd service since?

It should work fine with just the default settings, personally I have various Linux and Windows 10 computers as well as smartphones all accessing each other via SMB, literally as easy as installing the service (although I locked the security down a little).

You could try accessing a known share directly by pointing Thunar at this location:

Code: Select all

smb://GATEWAY-DX4870/sharename
(replace sharename with the name of an actual share)
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

Gruppo Sportivo wrote: Mon Dec 31, 2018 4:54 am Is Filezilla perhaps an option,Supports FTP, FTP over SSL/TLS (FTPS) and SSH File Transfer Protocol (SFTP)
Using Filezilla myself to transfer files from PC to a server
Thanks. I looked at Filezilla, but it's something that I rather not use. :D
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

Gruppo Sportivo wrote: Mon Dec 31, 2018 6:15 am
JerryF wrote:I looked into NFS and it's complicated.
rene wrote:NFS is also by the way exceedingly easy to set up
An attempt to explain how you should probably proceed,not sure if it is complete :

To share using NFS you need to install the nfs server: (not entirely sure if this is necessary for you)

Code: Select all

sudo apt-get update
sudo apt-get install nfs-kernel-server
For NFS add a line in fstab to mount the drive under /mnt so that its location and shared name is predictable. First make a directory under /mnt. Lets call it mySharedDrive.

sudo mkdir /mnt/mySharedDrive

Then add a line to fstab like this

UUID=uuidofpartition /mnt/mySharedDrive ext4 defaults,noatime,auto,nofail,x-systemd.mount-timeout=30 0 0

Type blkid at the command prompt to get the value of uuidofpartition.

You need to make a file /etc/exports which will contain lines like this:

/mnt/mySharedDrive 192.168.1.0/24(sync,no_subtree_check)

In the example, the drive mounted at /mnt/mySharedDrive is shared with any device on the 192.168.1.x subnet. Access will be read-only by default. For other sharing options refer to linux documentation for exportfs
Thanks. Will try this. When I was going through the instructions in the link in my first post, I installed nfs-kernel-server.
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

altair4 wrote: Mon Dec 31, 2018 8:37 am From your other machine ping the gateway machine this way:

Code: Select all

ping -c3 gateway-dx4870.local
Do you get a response?
Yes, I can ping it. Partner is on the Gateway now, so can't use it at the moment.
User avatar
JerryF
Level 16
Level 16
Posts: 6543
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Access one computer from another in home network

Post by JerryF »

gm10 wrote: Mon Dec 31, 2018 9:55 am How is the gateway set up? Did you modify the smb.conf in any way? Did you even install the samba package (I'm not sure it would even show up on the list without but you never know)? Did you reboot or manually (re)start the smbd service since?
Yes, I've installed Samba and all it's Recommended and Suggested in Synaptic Package Manager. I didn't modify the smb.conf. I checked on both computers and yes, smdb service is running.
gm10 wrote: Mon Dec 31, 2018 9:55 am It should work fine with just the default settings, personally I have various Linux and Windows 10 computers as well as smartphones all accessing each other via SMB, literally as easy as installing the service (although I locked the security down a little).

You could try accessing a known share directly by pointing Thunar at this location:

Code: Select all

smb://GATEWAY-DX4870/sharename
(replace sharename with the name of an actual share)
As soon as I can recreate a share on the Gateway, I will try this.
Locked

Return to “Networking”