0

Every time I open terminal on my Macbook Pro, I get the IP address of a server I once ssh'd into. I allowed someone to use my computer to access his server and now it seems like there's some permanent damage. As well, apparently he installed OSX Lion Server on my Macbook, instead of the default software (This may be relevant to the issue at hand). Is there any way to permanently disconnect from his server so my user ID comes up as my own? I have already tried basic commands like "exit", which seem to disconnect but then when I reboot terminal (which I need to, the exit command does not allow me to continue typing) it comes up with the same issue. There are other people with this problem, but the solutions do not work for me. Any help would be greatly appreciated because I am concerned that having his IP display in my terminal might suggest a two-way connection.

1 Answer 1

0

I think when your buddy installed OS X Server on your machine, that he set it up as if it was his own server, so he named it the same as he would name his own server. Since your computer thinks that's its name, that's what bash shows you in its shell prompt. I think you're seeing a shell prompt for your own machine. I don't think your buddy set your machine to automatically ssh into his server all the time.

Try running scutil --set HostName "" to clear out any locally-configured hostname in the System Configuration database. This should allow your computer will go back to determining its own hostname the usual way (which is usually via reverse DNS lookup). If you run that scutil --set ... command from an admin account (but not via a root shell or sudo), then you will be prompted in the GUI for your admin username and password to make this change. This is a good sign that you're actually dealing with your own machine, not your buddy's server.

After blanking out the HostName in the System Configuration database, open a new Terminal window and see if bash shows you a different hostname or IP address than it did before. If it does, it's a good sign that you've fixed your problem.

For good measure, reboot your machine and see what hostname you see in the bash prompt in Terminal after the reboot.

One other possibility worth mentioning is that maybe your machine is set to use a DNS server that's been configured to map your current IP address to the hostname of your buddy's server box. By default, OS X sets its own hostname based on what it gets back when it asks the DNS server what hostname is associated with the Mac's current IP address. So if your buddy set your Mac to us his DNS server, or if he started up OS X Server's DNS service on your machine, and configured that DNS server software to return his server hostname for your machine's IP address, that could explain it.

1
  • That seems to have fixed the problem! Now it is displaying "wifi-not-secure-1164" followed by my own name, which if I remember correctly is what terminal always used to display (for this wifi network at least) before my friend got hold of it. Thank you for your help!
    – user293854
    Commented Jan 28, 2014 at 18:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .