Auto ssh upon connection to wifi that isn't home with debian

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I want to set a poor man's VPN, so whenever I am away from home my traffic will automatically proxy through my house. I have the ssh command itself figured out, but don't know how to make it automatically happen as soon as I connect to wifi. the ssh command I am using is ssh -D 443 root@$ip -p 22 -N. For the sake of ease use hssid for home and assid for away. How do I accomplish this?







share|improve this question




















  • Look at the wpa_supplicant API, it produces events on connecting. Network manager also may or may not produce events, probably on the D-Bus. No, I don't know details, I'd have to look them up myself by reading the docs.
    – dirkt
    Mar 24 at 7:14














up vote
0
down vote

favorite












I want to set a poor man's VPN, so whenever I am away from home my traffic will automatically proxy through my house. I have the ssh command itself figured out, but don't know how to make it automatically happen as soon as I connect to wifi. the ssh command I am using is ssh -D 443 root@$ip -p 22 -N. For the sake of ease use hssid for home and assid for away. How do I accomplish this?







share|improve this question




















  • Look at the wpa_supplicant API, it produces events on connecting. Network manager also may or may not produce events, probably on the D-Bus. No, I don't know details, I'd have to look them up myself by reading the docs.
    – dirkt
    Mar 24 at 7:14












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to set a poor man's VPN, so whenever I am away from home my traffic will automatically proxy through my house. I have the ssh command itself figured out, but don't know how to make it automatically happen as soon as I connect to wifi. the ssh command I am using is ssh -D 443 root@$ip -p 22 -N. For the sake of ease use hssid for home and assid for away. How do I accomplish this?







share|improve this question












I want to set a poor man's VPN, so whenever I am away from home my traffic will automatically proxy through my house. I have the ssh command itself figured out, but don't know how to make it automatically happen as soon as I connect to wifi. the ssh command I am using is ssh -D 443 root@$ip -p 22 -N. For the sake of ease use hssid for home and assid for away. How do I accomplish this?









share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 7:11









user52470

807




807











  • Look at the wpa_supplicant API, it produces events on connecting. Network manager also may or may not produce events, probably on the D-Bus. No, I don't know details, I'd have to look them up myself by reading the docs.
    – dirkt
    Mar 24 at 7:14
















  • Look at the wpa_supplicant API, it produces events on connecting. Network manager also may or may not produce events, probably on the D-Bus. No, I don't know details, I'd have to look them up myself by reading the docs.
    – dirkt
    Mar 24 at 7:14















Look at the wpa_supplicant API, it produces events on connecting. Network manager also may or may not produce events, probably on the D-Bus. No, I don't know details, I'd have to look them up myself by reading the docs.
– dirkt
Mar 24 at 7:14




Look at the wpa_supplicant API, it produces events on connecting. Network manager also may or may not produce events, probably on the D-Bus. No, I don't know details, I'd have to look them up myself by reading the docs.
– dirkt
Mar 24 at 7:14















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433219%2fauto-ssh-upon-connection-to-wifi-that-isnt-home-with-debian%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433219%2fauto-ssh-upon-connection-to-wifi-that-isnt-home-with-debian%23new-answer', 'question_page');

);

Post as a guest













































































04b UEWE0k,3Y5E6RdR8
mjVFXxsUewlKX46V,1,xCI,9,Hv bvHbhR VYwdSj,LQi MwRHBUg8X KAwXUFCIdl,D3SbemP6Izi

Popular posts from this blog

How to check contact read email or not when send email to Individual?

How many registers does an x86_64 CPU actually have?

Displaying single band from multi-band raster using QGIS