2015年3月10日火曜日

Contrail のインストールはrootが必要

ubuntu1404以降、デフォルトではsshでrootログインできなくなっている。
なので、fab setup_allなどをやるまえに、rootのパスワードを作成し、rootでログインできるように/etc/ssh/sshd を書き換える必要がある。
[DEFAULT]
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin yes 
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
書き換えたらservice ssh restart で変更する
[DEFAULT]
service ssh restart 
ssh stop/waiting
ssh start/running, process 19377
Rootでログインできるかテスト
[DEFAULT]
ssh root@127.0.0.1
root@127.0.0.1's password: 
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-40-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

正常にログインできればOK