Ask Your Question
1

ssh resize [closed]

asked 2014-01-10 21:35:52 -0500

mili gravatar image

Hi,

I have a 3 compute nodes and I want to enable resizing between them. I'm using ubuntu 12.04 and HAVANA. The best link I found was how to do this on fedora but nothing for ubuntu. Please look below for fedora conf and please help me with ubuntu configuration.

Migrate and Resize

This is implemented currently by transferring the images between compute nodes over ssh. Therefore currently you need to make these adjustments on each compute node to allow that.

Allow logins for the nova user
 # usermod -s /bin/bash nova
 # su - nova
 $ chcon -u system_u -r object_r -t user_home_t .
 $ mkdir -p -m 700 --context=system_u:object_r:ssh_home_t:s0 .ssh && cd .ssh
Disable host identity checking by adding this to ssh config
 $ cat > config <<EOF
 Host * 
   StrictHostKeyChecking no 
   UserKnownHostsFile=/dev/null 
 EOF
Generate and distribute ssh key
 $ ssh-keygen -f id_rsa -b 1024 -P ""
 $ scp /var/lib/nova/.ssh/id_rsa.pub root@otherHost:/var/lib/nova/.ssh/authorized_keys
 # chown nova:nova /var/lib/nova/.ssh/authorized_keys

Cheers

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mili
close date 2014-01-19 20:45:46.510381

Comments

1

Well, I figured out half of it but still have an issue, This is what i did: On all compute nodes: ssh-keygen then copied the pub key: scp /var/lib/nova/.ssh/id_rsa.pub root@otherHost:/var/lib/nova/.ssh/authorized_keys and edited the sshconf StrictHostKeyChecking no UserKnownHostsFile=/dev/null But now i had one successful resize, but can resize after that, the reason being is i dont have 2way password less ssh, only the last .pub key that i copy works. this actully makes sense but i dont know what to do to have multyway passwordless ssh

mili gravatar imagemili ( 2014-01-10 22:34:03 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2014-01-10 23:15:52 -0500

mili gravatar image

updated 2014-01-10 23:16:21 -0500

Well, I figured out fully ;), This is what i did: On all compute nodes:

ssh-keygen

then copied the pub key:

scp /var/lib/nova/.ssh/id_rsa.pub root@otherHost:/var/lib/nova/.ssh/authorized_keys `

and edited the sshconf`

StrictHostKeyChecking no 
UserKnownHostsFile=/dev/null

Add two way or more than two way passwordless ssh: http://www.cyberciti.biz/tips/linux-multiple-ssh-key-based-authentication.html

And it workssss

edit flag offensive delete link more

Comments

On Ubuntu 14.04.1, just skip these two following steps and you're all good. Just tested on 2 compute nodes and it worked flawlessly. Thanks for this! :)

$ chcon -u system_u -r object_r -t user_home_t .
$ mkdir -p -m 700 --context=system_u:object_r:ssh_home_t:s0 .ssh && cd .ssh
chrone gravatar imagechrone ( 2014-09-23 22:56:07 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-01-10 21:35:52 -0500

Seen: 1,309 times

Last updated: Jan 10 '14