Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am currently running Fedora 18 with Gnome on two computers which are connected to the same router. I have been using Samba to share files between the two, but I know there must be a better way.

On the left panel in Nautilus, there is a menu for me to access my other computer's shared directories via Network -> Browse Network -> Windows Network -> Computer. What is the way to accomplish a similar way to access a shared directory between two Linux machines, without going through the "Windows Network"?

Preliminary research suggests that using SSH to mount a remote directory may be what I'm looking for, but when I SSH into the other computer, I am left at the console scratching my head. If that is the correct method, I would greatly appreciate it if someone would offer some insight on how to accomplish the sharing.

share|improve this question

4 Answers 4

up vote 4 down vote accepted

In Nautilus, select File | Connect to Server ...

There are a lot of options to share a file-system over a network in unix/linux. Nautilus supports some of them: ssh, webdav, ftp, smb and others. Obviously, any of these solutions needs that the corresponding daemon is running on remote host.

NFS is unix native "standard" way to share a file-system in a lan but the time needed to configure and manage such a solution is not worth the result in a so simple network as yours. IMHO, ssh is the best solution in your environment.

Usually ssh is used to log on and to execute commands on a remote machine. The way you connect to the remote machine is not the way to share a file-system but the way to execute remote commands. If you want to mount a remote file system via ssh via command line, try something like: sshfs remoteusername@host:/home/remoteusername /home/localusername/somedir (or use nautilus wizard).

share|improve this answer
    
In my version of Gnome, Nautilus does not have any such menu... however via the console, typing 'nautilus-connect-server' brought up the menu, and I was able to connect via SSH that way, but that only gives access to the user-that-I-logged-in-as's home directory... how would I get a link like this that shows me other "shared" directories like I had in Samba? Thanks for pointing me in the correct direction! –  Bryan Wolfford Mar 23 '13 at 21:06
    
IIRC, in old versions of gnome Connect to Server ... was not in File menu but in Go or Edit. –  andcoz Mar 23 '13 at 21:11
1  
Perhaps, you have to install gvfs (gnome virtual file system) package. –  andcoz Mar 23 '13 at 21:13
    
I think I have the most current version in Gnome 3, and there are no menus at all. –  Bryan Wolfford Mar 23 '13 at 21:13
    
searching yum for gvfs, I found gigolo - A simple frontend to easily connect to remote filesystem. I installed it, and it is doing what I need it to do... however, it feels like a work-around that is good enough until I spend more time learning about SSH, NFS, and GVFS. Thanks for the help! –  Bryan Wolfford Mar 23 '13 at 21:18

You can mount a SAMBA directory anywhere you want (with that you can access it via console or as a regular directory in nautilus).

# mount -t cifs //REMOTE_COMPUTER/Multimedia /mount/point -o guest

You need to install cifs-util.

share|improve this answer
    
I don't want to continue using windows compatibility software when windows is not involved. –  Bryan Wolfford Mar 23 '13 at 20:58

if your machines are UNIX-base such as linux you can use NFS (Network File Sharing) protocol.This protocol has /etc/exports being places you define shared directory, and you can connect to server with mount -t nfs. For example:

/home/mohsen/diff  10.0.0.2(rw,sync,subtree_check) localhost(rw,sync,subtree_check)

Above line, define a directory in /etc/exports and share it between this computer and 10.0.0.2 and localhost as client for read and write.

NOTE: each line for one dir.

 mount -t nfs localhost:/home/mohsen/diff ./x
share|improve this answer

I just wanted to comment that the easiest way to avoid the problem your having by only accessing the home folder of the user you log into is to log in as root as long as ssh.sshd_config file (in etc dir) is set up to allow this you will have access to your entire file system. Although if you do this i suggest also disabling password authentication and instead using SSH keys so that only the computer on your LAN will be able to use it. Predators will try to guess your password and can try hundreds or thousands in a matter of minutes no matter how strong your password is it can still be guessed... The key will make it so this is impossible. But your computer will be able to access all the files on the remote computer without a hitch. :)

share|improve this answer
    
A key can also be guessed as a password. In both cases it's the length that will determine how many tries are needed for a brute force attack. –  Matteo Feb 15 at 10:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.