博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to Mount a Remote Folder using SSH on Ubuntu
阅读量:6757 次
发布时间:2019-06-26

本文共 1428 字,大约阅读时间需要 4 分钟。

Connecting to a server across the internet is much more secure using SSH. There is a way that you can mount a folder on a remove server using the SSHFS service.

There are quite a few steps that you’ll have to follow, so get ready and open a terminal window.

First we’ll install the module:

sudo apt-get install sshfs

Now we will use the modprobe command to load it

sudo modprobe fuse

We’ll need to set up some permissions in order to access the utilities. Replace <username> with your username.

sudo adduser <username> fuse

sudo chown root:fuse /dev/fuse

sudo chmod +x /dev/fusermount

Since we’ve added ourselves to a user group, we need to logout and back in at this point before we continue.

Now we’ll create a directory to mount the remote folder in. I chose to create it in my home directory and call it remoteserv.

mkdir ~/remoteserv

Now we have the command to actually mount it. You’ll be prompted to save the server key and for your remote password.

sshfs <username>@<ipaddress>:/remotepath ~/remoteserv

Now you should be able to cd into the directory and start using it as if it was local.

geek@ubuntuServ:~/remoteserv$ ls -l

total 16
drwxr-xr-x 1 951247 155725 4096 2006-12-13 13:30 howtogeek.com
drwxr-sr-x 1 root root 4096 2006-09-11 06:45 logs
drwx—— 1 951247 155725 4096 2006-08-11 16:09 Maildir
drwxrwxr-x 1 951247 155725 4096 2006-10-29 02:34 scripts

转载于:https://www.cnblogs.com/yangtze736-2013-3-6/p/4741790.html

你可能感兴趣的文章
Linux System and Performance Monitoring(Network篇)
查看>>
XenServer关闭电源以后部分虚机无法启动
查看>>
IIS部署flask之实现文件上传功能
查看>>
redis开机启动
查看>>
XaaS ------什么都是一种服务
查看>>
Linux下磁盘配额
查看>>
从雅迪赞助FIFA世界杯透视体育营销趋势
查看>>
《用chsh选择shell》-linux命令五分钟系列之十二
查看>>
parseDouble() 的用法
查看>>
shell的基础语法
查看>>
CentOS 6.9使用Shell脚本实现FTP自动上传和下载文件
查看>>
#51CTO学院四周年#我与51CTO不得不说多的故事
查看>>
java函数参数默认值
查看>>
远程关机对企业的意义
查看>>
Kafka笔记整理(三):消费形式验证与性能测试
查看>>
WINPE集成SCSI/RAID驱动
查看>>
我们为什么需要大数据?
查看>>
单例模式-singleton
查看>>
自动布局下的iPhone 6 plus等比例放大,且UITextfield失败关于placeholder的原因
查看>>
利用div实现邮件收件人的输入框
查看>>