This question already has an answer here:
I'm using SSH to access a jump-box, essentially.
I have two machines. The "local" machine, the one I'm physically seated in front of, is running Fedora 25. The "server" is running Cent OS 7. It sits behind a router, and I use it to hop into the network behind that router. Both machines have an identical user account, "user1."
I connect to the server by opening my favorite terminal emulator on the local machine and entering "ssh -X -p 2201 server-dns.net" where server-dns.net is the correct domain name of the server. I enter my password, and I reach a prompt. When I look at the prompt, I see that my username hasn't changed, but my hostname has.
This is where the confusion begins. Both machines have a copy of Firefox installed, but only the server has a copy of Chromium installed. When I launch Chromium once connected, the remote instance of Chromium appears, and I can browse the remote network. But when I launch Firefox, my local install of Firefox opens. Why? When I ssh in as a different user, and launch Firefox, the remote install of Firefox opens. I know this issue is related to the usernames being identical, but how?