How to Allow Password SSH Authentication for Pantheon/Mercury Servers or other Amazon Images

4813392151 410cf9a73b

How to Allow Password SSH Authentication for Pantheon/Mercury Servers or other Amazon Images

If your server only allows public key ssh, you may want to allow ssh via password. We run across these servers from time to time, most frequently on Pantheon/Mercury sites, as password ssh authentication has been disabled by default. I could be wrong, but I think disabling of ssh password authentication is something done by Eric Hammond's AMI. If that assumption is correct, this information may be useful to you if you are using his AMI or a derivative of it. To enable password authentication, ssh into your server as root using a private key. Open the config file for the SSH daemon $ vim /etc/ssh/sshd_config Find the line
PasswordAuthentication no
Change to
PasswordAuthentication yes
Restart the SSH daemon $ /etc/init.d/sshd restart You will also want to add a user and give that user sudo rights. To do it in a more ubuntu-like way, you will want to give all members of the admin group sudo privileges. Create an admin group if one doesn't already exist $ groupadd admin Add all admin group members as sudoers. Your sudoers file is located at /etc/sudoers but you will not want to edit this file with a normal text editor. Use visudo instead of vim to edit the file in a safe way. It will lock the file and do some error checking. $ visudo Add the following line to the file and write out.
%admin ALL=(ALL) ALL
Now create a user, we'll call dustin, who is a member of the admin group. -s specifies the default shell for the user -d specifies the home directory -m creates a home directory -G adds the user to the admin group $ useradd -s/bin/bash -d/home/dustin -Gadmin -m dustin Finally, set the password for the user named dustin $ passwd dustin Photo Credit

Related Posts

Yet another simple Amazon S3 backup script for Drupal

Randall Knutson
Read more

Hostmonster / Bluehost Symlinks Issues Impacting Images and CSS - Drupal CMS

Brent Bice
Read more

Interactive Images for Blogs

Felipa Villegas
Read more

How to Create the Best Featured Images for Blog Posts

Lauren Davenport
Read more

October Recap: LevelTen's Best Blog Posts

Colin
Read more

Setting Up the Rackspace Cloud to Send Drupal Emails with SendGrid

Chris Sloan
Read more