Skip to content

Instantly share code, notes, and snippets.

@franz-josef-kaiser
Last active March 24, 2021 09:36
Show Gist options
  • Save franz-josef-kaiser/9430475a1e9b85fcf82e474e417abaf2 to your computer and use it in GitHub Desktop.
Save franz-josef-kaiser/9430475a1e9b85fcf82e474e417abaf2 to your computer and use it in GitHub Desktop.

Revisions

  1. franz-josef-kaiser revised this gist Feb 10, 2017. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions sshfs.sh
    Original file line number Diff line number Diff line change
    @@ -11,14 +11,18 @@ sshfs \
    -o IdentitiesOnly=yes \
    -o IdentityFile=/Users/username/.ssh/keyname \
    -o PreferredAuthentications=publickey \
    -o Ciphers=aes256-ctr \
    -o Ciphers=arcfour256 \
    -o auto_cache \
    -o cache_timeout=300 \
    -o cache=yes

    # Increase speed with weaker (but still good enough) encrypted Ciphers:
    # aes128-ctr or aes192-ctr
    # aes128-ctr, aes192-ctr, aes256-ctr
    # The fastest being arcfour256 followed by [email protected] which both are incredibly secure
    # @link https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Configuration
    # Performance Benchmarks
    # @link http://wiki.csnu.org/index.php/SSH_ciphers_speed_comparison
    # @link https://blog.famzah.net/2010/06/11/openssh-ciphers-performance-benchmark/

    # Large files should be compressed:
    # -o Compression=yes \
  2. franz-josef-kaiser revised this gist Feb 10, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion sshfs.sh
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ sshfs \
    -o PreferredAuthentications=publickey \
    -o Ciphers=aes256-ctr \
    -o auto_cache \
    -o cache_timeout=20 \
    -o cache_timeout=300 \
    -o cache=yes

    # Increase speed with weaker (but still good enough) encrypted Ciphers:
    @@ -25,6 +25,8 @@ sshfs \
    # -o CompressionLevel=9 \ # Range: 1-9

    # cache_timeout and ServerAliveInterval are set in seconds
    # For the cache timeout you might want to set the time, the remote server needs
    # to update its files, plus 1/6 to make sure you only get fresh files.

    # @TODO Make sure this file is called when the server starts or reboots

  3. franz-josef-kaiser revised this gist Feb 10, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions sshfs.sh
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,7 @@ sshfs \
    -o PreferredAuthentications=publickey \
    -o Ciphers=aes256-ctr \
    -o auto_cache \
    -o cache_timeout=20 \
    -o cache=yes

    # Increase speed with weaker (but still good enough) encrypted Ciphers:
    @@ -23,6 +24,8 @@ sshfs \
    # -o Compression=yes \
    # -o CompressionLevel=9 \ # Range: 1-9

    # cache_timeout and ServerAliveInterval are set in seconds

    # @TODO Make sure this file is called when the server starts or reboots

    # As an alternative, you can use CurlFtpFS, props @screamingdev Mike Pretzlaw
  4. franz-josef-kaiser revised this gist Feb 10, 2017. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion sshfs.sh
    Original file line number Diff line number Diff line change
    @@ -23,4 +23,7 @@ sshfs \
    # -o Compression=yes \
    # -o CompressionLevel=9 \ # Range: 1-9

    # @TODO Make sure this file is called when the server starts or reboots
    # @TODO Make sure this file is called when the server starts or reboots

    # As an alternative, you can use CurlFtpFS, props @screamingdev Mike Pretzlaw
    # @link http://curlftpfs.sourceforge.net/
  5. franz-josef-kaiser revised this gist Feb 10, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion sshfs.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,6 @@ sshfs \
    [email protected]:/home/user/project /local/folder/to/project \
    -o ServerAliveInterval=15 \
    -o ServerAliveCountMax=20 \
    -o auto_cache \
    -o reconnect \
    -o defer_permissions \
    -o negative_vncache \
    @@ -13,6 +12,7 @@ sshfs \
    -o IdentityFile=/Users/username/.ssh/keyname \
    -o PreferredAuthentications=publickey \
    -o Ciphers=aes256-ctr \
    -o auto_cache \
    -o cache=yes

    # Increase speed with weaker (but still good enough) encrypted Ciphers:
  6. franz-josef-kaiser created this gist Feb 10, 2017.
    26 changes: 26 additions & 0 deletions sshfs.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    #!/usr/bin/env bash

    sshfs \
    [email protected]:/home/user/project /local/folder/to/project \
    -o ServerAliveInterval=15 \
    -o ServerAliveCountMax=20 \
    -o auto_cache \
    -o reconnect \
    -o defer_permissions \
    -o negative_vncache \
    -o volname=vendorname \
    -o IdentitiesOnly=yes \
    -o IdentityFile=/Users/username/.ssh/keyname \
    -o PreferredAuthentications=publickey \
    -o Ciphers=aes256-ctr \
    -o cache=yes

    # Increase speed with weaker (but still good enough) encrypted Ciphers:
    # aes128-ctr or aes192-ctr
    # @link https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Configuration

    # Large files should be compressed:
    # -o Compression=yes \
    # -o CompressionLevel=9 \ # Range: 1-9

    # @TODO Make sure this file is called when the server starts or reboots