Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 21:37:07 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command

ssh root@ll works fine.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 21:27:06 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command
ssh not_existing
echo $?
ssh: Could not resolve hostname not_existing: Name or service not known
255
ssh pegasus exit
echo $?
0
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 21:26:26 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command

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…

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 17:35:11 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command
ssh_on_same_network_preferably Benjamin-Loison-HP-Debian hostname
Output:
Internet proxy
Benjamin-Loison-HP-Debian
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 17:26:59 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command

What about other protocols like SCP with scp?

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 17:21:54 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command

Being 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.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 02:23:50 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command
# [Benjamin_Loison/linux/issues/32](https://gitea.lemnoslife.com/Benjamin_Loison/linux/issues/32)
alias Benjamin-Loison-HP-Debian_ssh='if ping -c 1 Benjamin-Loison-HP-Debian > /dev/null
…
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 02:11:52 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command

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 exited ssh connection.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 02:09:34 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command

So figuring out if the computer is available on current network seems to take at most about 0m0.119s which is fine.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 02:02:57 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command
ping -c 0 Not-Existing
ping: bad number of packets to transmit.
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 02:01:57 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command
ping -c 1 Not-Existing
ping: unknown host Not-Existing
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-09 02:01:03 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command

As get same nslookup output on my flat wifi without Cloudflare DNS.

ping -c 1 Benjamin-Loison-HP-Debian
Output:
PING Benjamin-Loison-HP-Deb…
Benjamin_Loison commented on issue Benjamin_Loison/linux#27 2025-01-08 13:43:52 +01:00
Dual boot Windows time inconsistency

Just rebooting my Debian 12 GNOME work laptop seems to lead to the issue.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-08 11:13:35 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command
alias Benjamin-Loison-HP_ssh='ssh Benjamin-Loison-HP_CENSORED'
time nslookup Benjamin-Loison-HP
echo $?
Output:
Server:      …
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-01-08 10:53:14 +01:00
Make my SSH aliases prefer LAN over Internet but with a single command
After talking about it with the person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAjEk4CAOEN6Gf22csdaJEojX9mxG/Y+Xf8kNWyCx+7How
4jbzJF+RE6rbqw7Ur/5GYX…
Benjamin_Loison opened issue Benjamin_Loison/muPDF#6 2025-01-08 00:45:36 +01:00
Is this app still useful on LineageOS 22.1?
Benjamin_Loison opened issue Benjamin_Loison/cryptpad#34 2025-01-06 23:30:38 +01:00
*Reconnecting...* stucks while another new tab works fine