Skip to content

Instantly share code, notes, and snippets.

@Davor111
Created February 17, 2017 08:34
Show Gist options
  • Star 55 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save Davor111/4b6a3d638b5e7abdb8910f87d20e40d2 to your computer and use it in GitHub Desktop.
Save Davor111/4b6a3d638b5e7abdb8910f87d20e40d2 to your computer and use it in GitHub Desktop.
How to use sshuttle with .key, .csr or .pem files for authentication
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS:
sshuttle --dns -vr user@yourserver.com 0/0 --ssh-cmd 'ssh -i /your/key/path.pem'
@aniamembui
Copy link

Thanks so much Davor111 for your contibution: is very helpful to know how to add ssh parameters to SSHUTTLE !!!
Thank you !!

@thulasidhasan
Copy link

Thanks so much Davor111

@eit
Copy link

eit commented Nov 21, 2019

thanks

@tonsV2
Copy link

tonsV2 commented Jul 18, 2020

If you have an entry referencing the key for the server in .ssh/config all you need to do is:

sshuttle --dns -vr user@server 0/0 --ssh-cmd 'ssh'

@alexgtn
Copy link

alexgtn commented Jan 19, 2022

Thanks!

@AbhishekGangadhar
Copy link

Thank you so much!

@harryadel
Copy link

You may try this command, given that your remote server is defined in .ssh/config as myserver where xxx.xx.xxx.xxx is your server's IP.
sshuttle --dns -r myserver 0/0 -x xxx.xx.xxx.xxx

@ericxin1982
Copy link

Excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment