You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
981 B
48 lines
981 B
10 months ago
|
---
|
||
|
weight: 4
|
||
|
title: "sshfs: Cómo usarlo"
|
||
|
date: 2021-06-30T21:00:41+0200
|
||
|
draft: true
|
||
|
summary: "sshfs"
|
||
|
categories:
|
||
|
- pildoras
|
||
|
tags:
|
||
|
- ssh
|
||
|
---
|
||
|
|
||
|
## sshfs: modos de uso
|
||
|
|
||
|
{{< admonition type=abstract title="Referencias" open=true >}}
|
||
|
|
||
|
- <https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh>
|
||
|
|
||
|
{{< /admonition >}}
|
||
|
|
||
|
|
||
|
Ante todo tenemos que tener instalado `sshfs`:
|
||
|
|
||
|
```bash
|
||
|
sudo apt install sshfs
|
||
|
```
|
||
|
|
||
|
Supongamos que queremos mapear un directorio de un usuario remoto (`remuser`) en nuestro directorio personal.
|
||
|
|
||
|
Creamos un directorio que funcionará como punto de montaje en local y montamos el remoto:
|
||
|
|
||
|
```bash
|
||
|
mkdir -p ~/mnt/<remote_name>
|
||
|
sshfs remuser@remote_host:/home/remuser ~/mnt/remote_host
|
||
|
```
|
||
|
|
||
|
Montarlo como `root`
|
||
|
|
||
|
`sudo sshfs -o allow_other,default_permissions,IdentityFile=~/.ssh/id_rsa root@xxx.xxx.xxx.xxx:/ /mnt/droplet`
|
||
|
|
||
|
|
||
|
Desmontamos con `umount`
|
||
|
|
||
|
|
||
|
### Entrada en fstab
|
||
|
|
||
|
`sshfs#root@xxx.xxx.xxx.xxx:/ /mnt/droplet`
|