Make my SSH alias
es prefer LAN over Internet but with a single command
#32
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently I have two explicit commands for both networks.
I am fine with the idea of having to specify MAC address or on what network is the given computer.
Tracked at Benjamin_Loison/FileZilla/issues/15.
+12
Related to #28.
Related to Benjamin_Loison/openssh/issues/37.
This could be used by being temporarily in 4G to test Internet access, notably concerning Benjamin_Loison/openssh/issues/20.
After talking about it with the person:
Could make a raspberry pi resolver at home but this would shift the problem to it.
Could just make an
alias
in~/.bashrc
trying to resolve, possibly with a time out of something like 2 seconds, the computer on current network and if not able to, then leverage Internet proxy.As proposed, DynDNS does not seem to help.
On my Fairphone 4 Termux:
Output:
No matter if connected to Cloudflare DNS or not, there is maybe some cache involving a bias.
As get same
nslookup
output on my flat wifi without Cloudflare DNS.Output:
Output:
So figuring out if the computer is available on current network seems to take at most about 0m0.119s which is fine.
I suspect that if I try to
ssh
and depending on exit status try with Internet proxy, then it may be bias by possible correct but broken or exitedssh
connection. Related to Benjamin_Loison/openssh/issues/39#note_569621.~/.bashrc
:>&2
is to support correctly piping to clipboard.Maybe it is useful to use
ssh ... exit
to be more precise instead ofping
.${@:3}
source: the Stack Overflow answer 9057392Being compatible with just targeting a given computer, no matter the running OS hostname would be nice.
#28 may help to have an absolute computer address no matter the running OS.
What about other protocols like SCP with
scp
?~/.bashrc
:For my work laptop:
~/.ssh/config
:Output:
For OverClock3000:
~/.ssh/config
:Output:
Shared for work at https://tchap.gouv.fr/#/room/!VKLBJRaIhzIdNCigmg:agent.education.tchap.gouv.fr/$T8n94GOoEMYNw7jK4SriMssKwhnjRsnhWb4Er7jBnzc.
Related to Benjamin_Loison/openssh/issues/53.
To support nickname, may have to write some kind of dict in
~/.bashrc
but I do not like this approach.alias
should not work I guess, at leats not cleanly.Current
ping
is not compatible with nicknames. Could tryssh
.Output:
Output:
Output:
Maybe because in https://livebox in DHCP I assigned an IP to my phone.
Output:
ssh root@ll
works fine.DuckDuckGo search add ssh timeout.
Output:
Source: the Stack Overflow answer 5255550
Output:
Output:
Source: the Stack Overflow answer 32389925
Output:
Could make my tool be called as
ssh
and makessh
available asssh_raw
orinitial_ssh
.Would be nice if it is a not configured connection, then it works as default
ssh
and possibly mention such.is still useful as:
Related to Benjamin-Loison/android/issues/156 and Benjamin_Loison/openssh/issues/16.
Related to Benjamin_Loison/xclip/issues/1#issuecomment-2578323.
Would help Benjamin_Loison/Remmina/issues/19.
Benjamin_Loison/openssh/issues/37 would help.
Related to the Tchap message:
scp
+ tab on Termux leads to network devices enumeration, this is to investigate.Output:
Related to Benjamin_Loison/seedvault/issues/43#issuecomment-2786526.
Output:
Output:
Output:
Output:
on Debian 12 GNOME laptop on the wifi of the hotel:
Output:
An alternative is to use
ssh -X CENSORED_other_network
or maybe modify~/.ssh/config
.Output:
If
CENSORED
does not match the hostname of the server, then it always use Internet proxy I guess, like currently as the proxy domain name is offline.