Skip to main content

Mount file system over SSH (sshfs)

I do this between linux systems - Ubuntu 16 specifically in this example, shouldnt vary much.
Target File System on  bob@serverremote - no need to do anything on this system directly as long as it has ssh deamon

  • On your local system where you want to mount stuff from target:
    • Install sshfs package from your favorite distro - on ubuntu/debian do
      • apt install sshfs
    • if you havent already - create ssh id keys:  
      • ssh-keygen
    • If you havent already, copy the ssh id to target machine, so that you can ssh without password:
      • ssh-copy-id bob@serverremote
    • Create a directory to mount in
      • mkdir /home/esmaralda/mnt/serverremote
    • Finally execute the mount command
      • sshfs -o allow_other,IdentityFile=~/.ssh/id_rsa bob@serverremote:/ /home/esmaralda/mnt/serverremote

Comments

Popular posts from this blog

Cisco UCS Mini - Add Extender Chassis

If you happen to own a UCS Mini Setup, a 5108 Chassis with two Fi 6324 or similar, and you are looking for documentation on how to add another 5108 Chassis with fabric extenders (2204XP in my case), then Cisco really does not have much out there, nor is there a lot of googlable information either (Everything you find is related to standalone Fabric Interconnects and "standard" UCS). Even after calling TAC, it took a while to get something, and what they told us was not even accurate. So here is how we did it, and it worked, came up without any interruption to current chassis, network, or running profiles.
Equipment Of course we used our Cisco vendor to spec the equipment, but just for reference here is the list of what we had and what we added:

Original Setup 5108 Chassis Fi 6324 (Qty 2)Ports 1-2 for Fibre Channel, and 3-4 for Ethernet (MMF)Connected to a stack of switches and pair of FC switches/SANRunning UCS version 4.0.1 (Fairly recently upgraded as of May 2019)Added Equip…

Linux/Unix - Create a local Certificate Authority (CA)

I get these questions all the time - people know i have some runtime with certificates and such - one question is "Can't i just issue my own certs?" - and the answer of course is yes - but I always make sure to add that it won't be any use on a public web site since no-one will trust it.
So setting up your own CA is not "generally useful", it is more if you need some specific things, like issuing certificates with a single signing source for client logins or similar.

Most business will have a  couple of Windows Domain controllers, if you need to sign certs for a limited set of users, what you should do is make sure some system in your windows domain runs Certificate Services, then issue certs from there, make sure any non-domain-members has a trust for that CA.

If you actually do need to set up you own CA, here is one way to do it
Procedure to set up your own local CA The common name for the CA cert must NOT be the same as a domain name or anything else you…

New Lines - Windows/Unix/Linux/MacOS - viM

If you deal with scripts and other text files and move between platforms you probably discovered this "issue".
Only the founding developers can explain why they chose what they did - googling about will show you a couple of different explanations - whatever the reasons, here are the differences and how to convert.
The formats The Characters in use (referenced in OS info below)LF Usually referred to as LF  or Line feedAscii code decimal 10Hex: A or 0xAOctal: 12 or O12Typical Escaped character in many shells and languages: \nCRUsually referred to as CR or Carriage ReturnAscii code decimal 13Hex D or 0xDTypical Escaped character in many shells and languages: \r Unix, Linux, and Modern MacOS - The POSIX standard Each Line ends with a single character:  LF
Most programming languages will understand/interpret this format properly.
Simple Windows programs, like the built in Notepad will not show this properly.

Windows (and DOS) Each line ends with two consecutive characters in this …