My Emacs settings
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
481 B

(defun tunnel (port host)
(interactive "sPort: \nsHost: ")
(let ((buffer "SSH Tunnel"))
(async-shell-command
(concat "ssh -C -N -D " port " " host)
buffer)
(with-current-buffer buffer
(insert (concat "Starting tunnel on " host " port " port)))))
(defun sshuttle-tunnel (host)
(interactive "suser@host: ")
(let ((buffer "sshuttle"))
(async-shell-command
(format "sudo sshuttle --dns -r %s 0.0.0.0/0" host)
buffer)))
(provide 'tunnel)