Server Moves

From DreamHost
Jump to: navigation, search

Overview

Server changes may be needed from time to time in order to optimize the hosting environment and make it more robust and dependable.

This wiki gives you information on what changes when a server moves and how to resolve these issues.

What changes when a server moves?

Server name

When your server is changed, the name of it also changes. Each shared server at DreamHost has a specific name.

Please review the Finding your FTP server hostname wiki for information on how to view the name of your web server.

Below are some things you should check prior to the move to insure that things go as smoothly as possible:

  • Make sure when you FTP/SFTP/SSH to your domain, you use your domain as the hostname.
  • If your domain is example.com, you would enter exactly that as your hostname.
  • Do not add http:// to the URL.

DNS settings

Here a few steps to set up your DNS settings when a server moves:

  1. Review the email that is sent to you once the server migration has completed – your new server is listed in the Subject line.
  2. If you are not using DreamHost’s nameservers, update your IP address once the server is migrated.
    If your IP continues to point to the old server IP, your site will not function.
  3. View the DNS wiki for information on how to find the correct IP address of your site.
  4. If necessary, update the correct IP of your site at the company that hosts your nameservers.

Keep in mind, Unique IPs will change as well since DreamHost does not offer static IP addresses.

Fixing issues after the move

After the migration completes, you may notice errors with your site or you may find it’s not responding as it once did.

The following sections help you troubleshoot the most common causes of this.

My site is not responding

This is most likely a DNS issue. Since the server changed, the IP of the site also changed.

View the DNS settings section above to correct this.

My uploaded files do not display online

This is likely because you're using the old server name as your FTP hostname. If you're using something like SERVER.dreamhost.com as your hostname, you'll need to change that to your new server name (which is given to you in the Subject line of the email confirming that you've been successfully moved). Review the Finding your FTP server hostname wiki for more information on how to view the name of your web server.

An even better idea is to use your domain name. The domain name will automatically point to the correct server no matter where it's moved.

My server key is incorrect

Since you'll be moving to a new server, the SSH keys will also change. If you have the key of the old server saved on your local computer, you'll need to remove it. When you log in to the new server after that, it will prompt you to save the new key.

Here's an example of what it will look like when you log in with an incorrectly saved key:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for www.example.com has changed,
and the key for the corresponding IP address xxx.xxx.x.xxx
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
0e:c2:f6:f4:d9:86:9d:4b:c4:3d:77:e7:a4:bb:59:14.
Please contact your system administrator.
Add correct host key in /Users/username/.ssh/known_hosts to get rid of
this message.
Offending key in /Users/username/.ssh/known_hosts:3
RSA host key for www.domain.com has changed and you have requested
strict checking.
Host key verification failed.

If you’re using a Mac or Linux computer, you can remove the key from the /Users/username/.ssh/known_hosts file from your local computer and then accept the new key on the next login.

Using Mac OS X

  1. Open a terminal window (Applications>Utilities>Terminal).
  2. At the prompt, type:
     cd .ssh
     ls
    
    The key is displayed.
    • It should display as a text file named known_hosts.
    • You may open this in a text editor and remove the offending lines.
    • Alternatively, if DreamHost is the only server you have keys for and the only server you connect to, you may delete this file.
  3. To delete this file, type:
    rm known_hosts  
Note2 icon.png Notes:
  • If you log in to other servers, do not delete the known_hosts file, or you’ll have no way of knowing if your SSH keys have changed.
  • If you log in from multiple user accounts on your local device, you may have to do this multiple times (logging in for each user account on your computer's local device.


Using Linux (OpenSSH)

The OpenSSH version of SSH provides a command-line utility to remove specific host keys without disturbing the others. This is especially useful if you use SSH to connect to more than one host and you don't want to hand-edit the known_hosts file.

At your shell prompt, type:

ssh-keygen -R www.mydomain.com
  • This will create a backup of the ~/.ssh/known_hosts file and remove the old key of www.example.com from the current known_hosts.
  • Repeat as necessary for each domain that was moved.