Created
January 24, 2012 10:19
-
-
Save arekinath/1669479 to your computer and use it in GitHub Desktop.
Revisions
-
arekinath revised this gist
Jan 24, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ 1. Put these files in /etc/persistent on the ubnt 2. on the ubnt device, do: cd /etc/persistent chmod +x rc.postsysinit ssh-tunnel dropbearkey -t rsa -f ubnt-rsa 3. dropbear will print out the public-key part (line that looks like: ssh-rsa XXXXXX... ) 4. put this ssh-rsa line into ~/.ssh/authorized_keys on the server -
arekinath created this gist
Jan 24, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ 1. Put these files in /etc/persistent on the ubnt 2. on the ubnt device, do: cd /etc/persistent dropbearkey -t rsa -f ubnt-rsa 3. dropbear will print out the public-key part (line that looks like: ssh-rsa XXXXXX... ) 4. put this ssh-rsa line into ~/.ssh/authorized_keys on the server 5. on the ubnt device, do: cfgmtd -r cfgmtd -w -p /etc 6. reboot the ubnt (eg type "reboot" and enter) Now, on the server (in this case xylem.cooperi.net) you can do ssh -p 12345 admin@localhost type the admin password for the ubnt device and you're in! Note: this is a simple draft, it needs support for dynamic port numbers, needs to handle timeouts better and have some sort of mechanism on the server side to keep track of which ports belong to which APs This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ #!/usr/bin/sh /etc/persistent/ssh-tunnel & This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ #!/usr/bin/sh trap "echo hup" 1 while true; do ssh -R 12345:127.0.0.1:22 -y -N -i /etc/persistent/ubnt-rsa [email protected] done