• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

Rackspace Cloud Essentials 3 - Going From Mac To Linux Using Terminal


Secure shell connection

If you are a Mac user, you don’t need to install a third party client like PuTTY to connect to your Cloud Server via Secure Shell (SSH). Terminal is a terminal emulation program included with Mac OS that can be used to run ssh. It can be accessed at Applications > Utilities.

First login

These instructions are written for users connecting to a new Cloud Server for the first time.  If you’re connecting with a non-root user, replace root in the instructions with your username.

Follow these steps to connect to your Cloud Server with Terminal:

  1. Launch Terminal. You will see a terminal window interface.
    user00241 in ~MKD1JTF1G3->$
  2. Establish an SSH connection to your Cloud Server. The correct syntax is:
    ssh root@IPaddress

    Example:

    MKD1JTF1G3->$ ssh root@166.76.69.51
  3. The first time you connect to your Cloud Server, you will see a message asking if you want to continue connecting.

    This is because your Cloud Server has an RSA key not stored in your system registry, the identity of which cannot be verified.

    The authenticity of host '198.61.208.131 (198.61.208.131)' can't be established.
    RSA key fingerprint is 47:ff:76:b4:211:0f:11:15:21:bd:92:2f:44:0a:d9:0a.
    Are you sure you want to continue connecting (yes/no)?

    Type yes and hit enter. This adds the RSA key to the list of known hosts. You will not see this warning again during future connections.

  4. Enter the root password for this server. The password will not echo to the screen.
    MKD1JTF1G3-$ ssh root@198.61.208.131
    root@198.61.208.131's password:

    If you entered the correct password, the prompt will respond with a shell prompt as seen below:

    [root@yourservername ~]#

First things first – changing the root password

Change the root password after your first login.

  1. At the shell prompt, enter

    passwd
  2. Change your password:

    Enter new UNIX password:
    Retype new UNIX password:
  3. If the passwords match, you will receive the following confirmation that the authentication tokens have been updated successfully:
    Passwd: password updated successfully

    Use the new password with the root user when connecting to your server.

The next article will show you how to use Rescue Mode to connect to your Cloud Server.  This is useful when performing troubleshooting and when your server becomes unresponsive.



© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER

8 Comments

For the record, "Terminal" is the default terminal application in Mac OS X. iTerm is a 3rd party application that works much better, but has to be downloaded/installed on a clean OS X install. There is also the old and now defunct iTerm project, and "iTerm2" that picked up where that one left off and is still updated.

It is odd that on a web page entitled "Knowledge Center" you call iTerm an ssh client. This shows such a depth of confusion between the concept of "terminal emulator" and "ssh client" that it is truly sad.

Hm, I knew this article was badly out of date, but I hadn't quite noticed how much work it needed. I'll put a rewrite at the top of my priority list.

My understanding is that Drush isn't set up on Rackspace for cloud servers, correct?

There shouldn't be any reason for drush not to work on a Cloud Server, to my knowledge. It doesn't require access to anything that would be affected by the virtualization layer. Are you trying to use it and running into a problem?

Drush isn't set up as default on Rackspace (or any Linux server); you need to download it, just like any other Drupal module. But it works perfectly fine once you've done that!

If after you ssh from a MacOS to a cloud server to run some application, and receive locale related error, such as this:

locale::facet::_S_create_c_locale name not valid

You may need try to ssh from a Linux box. It is a known MacOS ssh issue.

Ref:
https://github.com/udoprog/c10t/issues/203

Thanks S.Y. It looks like it's an issue with the locale information being passed, and the problem can be worked around with an sshd_config change.

If you don't have a Linux machine handy, you can access the web console for your server via the Cloud Control Panel. Once you're in, edit the file:

/etc/ssh/sshd_config

Find the lines that start with "AcceptEnv", and insert a "#" character in front of each. The issue appears to lie in one of the localization variables being passed, so disabling acceptance of those variables is a workaround.

Once you make the change, restart the ssh service (depending on the distro, run either "service ssh restart" or "service sshd restart"). Then try to connect again.

Add new comment