# What is the best way to share /home over the (inter)net?

## Kasumi_Ninja

I have several computers in a lan and I wonder what is the best way to share the /home directory? NFS is a possibility but considered unsafe by a lot of people (don't know why) and really unsafe when used over the internet. But... Which alternatives are there? Any advice would be appreciated   :Smile: 

----------

## NeddySeagoon

Aniruddha,

If its just for a single user, look at sshfs. Which only needs sshd on the server end and sshfs at the client end.

----------

## Kasumi_Ninja

 *NeddySeagoon wrote:*   

> Aniruddha,
> 
> If its just for a single user, look at sshfs. Which only needs sshd on the server end and sshfs at the client end.

 

Neddy,

Thanks for the help! Unfortunately documentation about sshfs seems more sparse then e.g. NFS. Do you have an idea where I can get a good howto? For example I would like to boot such partition automatically at boot, is this possible and if so, can I add a line to fstab. And what about security? What do I put in hosts.allow/deny? Oops lots of question already  :Rolling Eyes: .

Update:

Found some fstab info here:

http://fuse.sourceforge.net/wiki/index.php/SshfsFaq

----------

## mudrii

depends on the file

if is a big files like more than 1M and need download and upload no much editing ftp is the solution.

for mounting like on local drive nfs4 is the best and nfs4 fixes most of the securety problems from nfs3 but you shoud configure corectly nfs demon and firewall.

----------

## Kasumi_Ninja

 *mudrii wrote:*   

> depends on the file
> 
> if is a big files like more than 1M and need download and upload no much editing ftp is the solution.
> 
> for mounting like on local drive nfs4 is the best and nfs4 fixes most of the securety problems from nfs3 but you shoud configure corectly nfs demon and firewall.

 

To enable it I have to only enable nfs4 support in the kernel?

----------

## NeddySeagoon

Aniruddha,

sshfs is really as simple as I described. The remote host runs sshd

The local box needs your to do 

```
emerge  sys-fs/sshfs-fuse
```

The man page tells you everything else you need to know.

To do automounting at boot, your user would need to use key based ssh logins, so no password is required.

The mount command is 

```
$ sshfs roy@eccles: home_eccles/
```

so you wpuld put in it /etc/conf.d/local.start and make it run as as the user who needed to access the filesystem. Its really single user only. The remote directory to be mounted uses normal scp syntax.

----------

## i92guboj

Another possibility is to just run sshd in the server, and then just explore fish://user@server:port in konqueror, of course, only for those not picky about installing anything that is not a motif application  :Razz: 

----------

## mudrii

problem is from what OS are you intending to access Server if from the unix like sys than sshfs nfs is food solution but from windows box you may run in trouble with users using it with ftp is most easy i think and you have windows ftp native solutions.

For nfs4 check this link

http://gentoo-wiki.com/HOWTO_NFSv4

----------

## defenderBG

more like that if u use ssh u will need more processor power for the encryption/decryption, otherwise sshd ++  :Wink:  in windows there are a few nice apps for that, like the ssh client:

http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html

----------

## Kasumi_Ninja

 *mudrii wrote:*   

> problem is from what OS are you intending to access Server if from the unix like sys than sshfs nfs is food solution but from windows box you may run in trouble with users using it with ftp is most easy i think and you have windows ftp native solutions.
> 
> For nfs4 check this link
> 
> http://gentoo-wiki.com/HOWTO_NFSv4

 

Windows? What is that? Wasn't that an OS from the 95's?   :Razz: 

----------

## Mad Merlin

 *defenderBG wrote:*   

> more like that if u use ssh u will need more processor power for the encryption/decryption, otherwise sshd ++  in windows there are a few nice apps for that, like the ssh client:
> 
> http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html

 

For a connection over the Internet, even the slowest machines will be able to saturate your connection through SSH. I have a Duron 1200 here that can saturate 100 mbit ethernet (although with close to 100% cpu usage) through scp. Most Internet connections are at least an order of magnitude slower than 100 mbit ethernet, and most computers are substantially faster than a Duron 1200, making the cpu overhead trivial. Additionally, SSH can use transparent compression, which can greatly speed things up, depending on the sort of files you're transfering.

----------

