- Edit the /etc/ssh/sshd_config file and change the line that says "PermitRootLogin No" to "PermitRootLogin without-password". Then restart the sshd server with "service sshd restart". Be careful, if you screw up the sshd file, it is possible you will only have your current ssh session to fix it, so always test any changes with a second session.
- Edit the /root/.ssh/authorized_keys file. The first (and only) entry starts with "command ... sleep 10; ssh-rsa [big long key]". If you remove the text from the beginning of the line until where it says "ssh-rsa", you will be able to login as root via SSH with your Amazon keypair.
Technology and process fine points, notes and thoughts. Public blog of Whirix web development company from Barnaul, Russia.
Wednesday, February 2, 2011
Root login to Amazon EC2 instance
Login to fresh EC2 instance as root can return error: "Please login as the ec2-user user rather than root user". You can login easily as "ec2-user" and execute administration commands using "sudo ..." or just become root using "sudo su". But it's not always comfortable and if you want to login via SSH as root, follow these simple steps.
Tuesday, February 1, 2011
Bzr to Git Migration
The migration from Bzr to Git is very simple, though it's not obvious. We found that Git is faster on pushing to (and pulling from) remote repositories. This is the only reason why we migrate some projects from Brz to Git. As for any other aspects — we are just happy with Bzr.
Well, I suppose you work on Linux.
1. Install bzr fastimport plugin:
Well, I suppose you work on Linux.
1. Install bzr fastimport plugin:
> mkdir -p ~/.bazaar/plugins2. Install python package required by fastimport plugin:
> cd ~/.bazaar/plugins
> bzr clone lp:bzr-fastimport fastimport
> cd ~3. Now we can export bzr repository to git:
> bzr clone lp:python-fastimport
> cd python-fastimport
> ./setup.py install (need root privileges here)
> cd my-bzr-reposHere it is.
> git init
> bzr fast-export --plain . | git fast-import
> rm -rf .bzr
> git reset --hard
Subscribe to:
Posts (Atom)