set up sshfs as a non-root user on linux

  1. sudo apt-get install sshfs
    sudo usermod -a -G fuse uid: add uid to fuse group
    /etc/fuse.conf: comment out user_allow_other.
    /etc/modules: add fuse module
    sshfs uid@remotehost:/home/uid /home/uid/mnt/desktoplinux  -o allow_other
Posted in sshfs, Uncategorized | Tagged | Leave a comment

measure network speed with netcat

  • destination: sudo nc -lkv 9999 > /dev/null
  • src: dd if=/dev/zero bs=1024K count=512 | nc -v 9999 (copy 10meg data with block size 16k)
Posted in netcat | Tagged | Leave a comment

port forwarding

  • TCP port forwarding: SSH port forwarding/reverse port forwarding, iptables.
  • SSL: stunnel runs in client mode talks to stunned runs in server mode
  • UDP and TCP: socat
Posted in stunnel | Tagged | Leave a comment

How to install mediagoblin

Posted in Uncategorized | Leave a comment

How to get the external public IP via ssh port forwarding

  • ssh -T -L <production machine alias> : there is a server listening on port 7080 locally forwarding the traffic to
  • curl -H “” http://localhost:7080/plain; echo
  • “ can be replaced with etc.
Posted in Uncategorized | Leave a comment

ssh local port forwarding for testing LinkedIn

The Problem

How to reproduce the issue from a dev machine that has SSH access to the production cluster. 

  • Python code that invokes the LinkedIn API.
  • On dev machine, run ” sudo ssh -L production_id@production_ip”, this will route the localhost:443 to via a target production machine.
  • DNS spoofing such as dnsmasq:


dnsmasq.hosts: “”

sudo service dnsmaq restart

Posted in ssh | Leave a comment

install pip on centos

According to,

curl | sudo python –

Posted in Uncategorized | Tagged | Leave a comment