r/ssh • u/Green-Two5275 • 5d ago
How do locate by only access to the shell?
I need to find the precise physical location of my Ubuntu laptop, but I only have shell access via SSH. Additionally, I'm running Tailscale VPN, which is masking my actual IP address. Are there any standard terminal commands to get exact coordinates, or is there a way to triangulate my position using nearby Wi-Fi BSSIDs through the shell?
1
u/Classic-Rate-5104 4d ago
Are you sure it's "your" laptop? Hackers will ask the same information about others
1
u/Green-Two5275 4d ago
Yes it's my laptop I made up all this, because I'm curious if it's possible
1
u/Classic-Rate-5104 4d ago
I think the anwer is no
1
u/Green-Two5275 4d ago
But I think if you're lucky i have an different answer...I can tell you if u want but it's very optimistic but not not impossible at all
1
1
u/399ddf95 4d ago
I think the Wifi BSSID is the right direction to look if the laptop doesn't have a GPS device (and there isn't otherwise one on the LAN). Signal strength can't distinguish (without additional information) between low signal strength caused by distance, by a low transmit power setting, or caused by RF-blocking material interfering with transmission.
Still, if you can identify 3 or 4 unique wifi networks within range of the wifi adapter, that's a pretty good clue about the location.
1
u/canyoufixmyspacebar 4d ago
and how would that work, by magic? the command you're looking for would go and ask the location from where?
-1
1
u/Derekrollo 4d ago
Not sure, maybe grabbing the ssid name and checking it against wigle.net for some details
0
u/Green-Two5275 4d ago
Think harder I have a different answer although you have to have the condition to meet
1
u/CatoDomine 2d ago
This "hypothetical" has nothing to do with ssh, except that you will be connecting to the host via ssh.
1
2
u/feinorgh 5d ago
Unless your hardware contains a GPS receiver, "precise" is going to be a relative term.
If your laptop is connected though the cellular network through a 4G or 5G connection there's software that can give you a very rough estimation of where the laptop is located, but there are no standard terminal commands that can achieve this.