MITM: mitmssh

From OnnoWiki
Jump to: navigation, search


# Download mitmproxy
git clone
#Generate mitm keys (these go to ~/.mitmkeys)

Now you want to install the SSH key you just generated to the server you want to mitm.

#Install SSH key
ssh-copy-id -i ~/.mitmkeys/ user@victimserver

Then run the proxy, pointing it at the victimserver.

#Run proxy
./mitmproxy_ssh -H victimserver

This runs the proxy on localhost:2222

Now simply connect to the local proxy:

ssh localhost -p 2222

And ta-da! You should see the raw data sent between client and server in the window you ran mitmproxy_ssh.