Tag Info

Hot answers tagged

16

I believe you need use the allow_other option to sshfs. In order to do this, you should call it with sudo, as follows:- sudo sshfs -o allow_other user@myserver:/home/user/myprojects ~/mount/myprojects Without this option, only the user who ran sshfs can access the mount. This is a fuse restriction. More info is available by typing man fuse. You should ...


12

You can run sshfs with the "reconnect" option. We use sshfs with PAM/automount to share server files for each workstation in our network. We use -o reconnect as parameter for sshfs, mostly because our users suspended their computers and on wake sshfs would not reconnect (or respond, or anything). For example: sshfs ...


11

A better solution might be to add the user to the fuse group, i.e.: addgroup <username> fuse


9

Here's what works for me: sshfs me@x.x.x.x:/remote/path /local/path/ -o IdentityFile=/path/to/key You can figure this out via man sshfs: -o SSHOPT=VAL ssh options (see man ssh_config) man ssh_config IdentityFile Specifies a file from which the user's DSA, ECDSA or DSA authenā€ tication identity is read.


6

sshfs uses the SSH File Transfer Protocol (SFTP). The workaround that you have enabled is working around the semantics of a rename() operation over that protocol when the "new" name already exists. The POSIX behavior for rename() in this case is to remove the existing file and complete the rename. In the SFTP protocol, you can rename a file with the ...


5

Key-based authentication can only work if the ssh process can find your key. You presumably have your key in your home directory; but you've never told sshfs where to look for a key. At boot time, it would be root mounting all filesystems, therefore the key must be either in /root/.ssh or referenced in /root/.ssh/config. I recommend mounting the filesystem ...


4

I'm not familiar with sshfs, but I know the nobootwait option works for local disk partitions. Maybe try: sshfs#ecarroll@o99:/opt/dealermade/ftp/inc /opt/dealermade/ftp/inc fuse defaults,idmap=user,users,nobootwait 0 0 (A quick google search also shows archlinux uses nofail as per this thread. A little more googling shows that nobootwait might be a ...


4

This should be a comment to mrb's answer. But I am not allowed to add comments, so adding this as another answer. We can use the following dd command for the 100GB image creation to save some time. dd if=/dev/zero of=/mnt/hetzner_backup/backup-fs.image bs=1024 count=0 seek=$[1024*1024*100] This finishes in a fraction of a second, while the one in mrb's ...


4

Mount your network location with whichever protocol you're using: # smbfs example: mount -o username=your_hetzner_username //server.or.ip.addr/sharename /mnt/server-mountpoint Create an ext2fs image (or another filesystem, if you prefer) inside a file on that share. Do this only the first time, as it wipes the data in backup-fs.image: # create a 1000 MB ...


4

sshfs cannot handle block devices. It will treat everything as a file. You would need to get creative with ssh, dd, and command line redirection like so: PC2 -> PC1: dd of=/home/Alan/Desktop/image.iso < ssh root@PC1 "dd if=/dev/sdb" or from PC1 -> PC2: dd if=/dev/sdb | ssh root@PC2"dd of=/home/Alan/Desktop/image.iso"


4

If you're using sudo then you're likely using root's credentials to mount, which I do not believe is what you want. I wouldn't probably do what you're asking, wrt. mounting to /mnt as user1 and acessing as user2. It's going to get complicated with groups & user permissions. If you truly want to mount a directory to /mnt to share then you really should be ...


4

Unfortunately, that is not possible with -o. The list of ssh options supported by sshfs can be found in the source code: static const char *ssh_opts[] = { "AddressFamily", "BatchMode", "BindAddress", "ChallengeResponseAuthentication", "CheckHostIP", "Cipher", "Ciphers", "Compression", ...


3

You will need to do a double symlink similar to what /etc/alternatives does on Ubuntu namely: Inside ~ you will have a link: linked_directory -> /<local filesystem>/linked_directory On each of the local machines: /<local filesystem>/linked_directory -> /<actual location>/linked_directory As long as neither /<local ...


3

To answer your question directly dd if=/dev/sdb2 ibs=1M | ssh -C myServer 'dd of=/path/to/destination obs=1M' For bonus you can do the following to see the progress (assuming you have the pv utility) pv /dev/sdb2 | ssh -C myServer 'dd of=/path/to/destination obs=1M'


3

Given the message failed to open /etc/fuse.conf: Permission denied, I suggest chmod a+r /etc/fuse.conf


3

As jw13 pointed out, this is almost an exact duplicate of "ls taking long time in small directory" - at least as far as the explanation is concerned. Make sure to read the comments there too! In a nutshell, some popular command-line programs like ls can operate differently when their output does not go directly to a terminal. In this very case, ls, which is ...


3

I haven't checked recently but if any directory in the path to .ssh is world writable SSH would refuse to use authorized keys from it. These permissions could allow other users to fake you .ssh directory. If the home directory is writable by anyone else it will not be used unless StrictModes is turned off.


3

This sounds like a job for autofs. It's rather adept at handling network mounts of various kinds (nfs, samba, sshfs, you name it) and noticing when those things need re-mounting. It can also takes care of unmounting them after periods of disuse and mounting them when a file system request is made.


3

What you need to do is specify which private key to use in the .ssh/config file like this: Host server1.nixcraft.com IdentityFile ~/backups/.ssh/id_dsa Host server2.nixcraft.com IdentityFile /backup/home/userName/.ssh/id_rsa


3

The remote host sees nothing but the (encrypted) reads and writes to the file.


3

You can use the ProxyCommand you can setup ssh so that it will connect to a "gateway" system and then connect to a secondary system that's behind the "gateway" system. Host internal-host User sam IdentityFile ~/.ssh/id_rsa ProxyCommand ssh user@gateway nc internal-host.somedom.com %p This technique makes use of the tool nc to act as a ...


3

Use ssh-agent to store the key, then sshfs can use the key from the agent without asking for the passphrase. - Of course you now need to supply the passphrase to add the key to the agent. - mate-keyring might help you with this.


3

Like many editors, Sublime saves to a temporary file, then moves that temporary file into place. It's done this way in case the system crashes during the save: it's guaranteed that either the original file or the new version will be present, you don't risk losing the file. SSHFS is built on top of SFTP, which (at least as implemented by OpenSSH) does not ...


2

This can be worked around by decreasing the timeout. Add the following to $HOME/.ssh/config or /etc/ssh/ssh_config: ServerAliveInterval 15 ServerAliveCountMax 3 This results in a 45 seconds timeout.


2

According to your output from ssh quackgame ls -ld /home/game, /home/game is only writable by the file owner, game, and not by the users group. Try running chmod g+w /home/game on quackgame and see if it works.


2

I solved problem. First I created global known_hosts file in /etc/ssh/ssh_known_hosts. Main problem was visible in this line of debug: command: 'pmt-fd0ssh' 'mount.fuse' 'sshfs#pszubert@HOST:' '/home/pszubert' '-oreconnect,idmap=user,password_stdin,nonempty' As we can see there is no space between -o and options. Adding line: ...


2

You can use a ssh tunneled pipe: dd if=/dev/sdb2 ibs=1M obs=64k | ssh -C user@remotehost "cat > /path/to/destination" The -C option enables compression in the ssh protocol which usually improves the performance in cases like this. If you have pv installed, you can include it in the pipe to get more information how much already is transferred. dd ...


2

FUSE has options to control who has access to the files. I'm guessing you want sshfs -o allow_other.


2

Symlinks will not help, since they are written to the filesystem -- and so they will always be the same on both machines. However, if your administrator installed bindfs, you can mount different things on both machines. For example, on local, you use sshfs to mount compile:/opt/foo/ with ~/foo/ as the mount point. On compile, you use bindfs to mount ...


2

The remote files are accessed as the remote user that you logged in as, i.e. root. There's no other way, really. The error you're getting is due to permissions on the local side. It's an oddity in FUSE, which SSHFS is based on. By default, only the user who did the mounting can access a FUSE filesystem. Even root cannot access it. Preventing the root user ...



Only top voted, non community-wiki answers of a minimum length are eligible