This is very odd as the place where this is set up is using ssh-keygen (which does the right thing with permissions) with this bit of code:
def initialize_ssh_keys(user='root'): home_dir = pwd.getpwnam(user).pw_dir ssh_dir = os.path.join(home_dir, '.ssh') if not os.path.isdir(ssh_dir): os.mkdir(ssh_dir)
priv_key = os.path.join(ssh_dir, 'id_rsa') if not os.path.isfile(priv_key): log('Generating new ssh key for user %s.' % user) cmd = ['ssh-keygen', '-q', '-N', '', '-t', 'rsa', '-b', '2048', '-f', priv_key] check_output(cmd)
I wonder how it is getting changed to 644?
We could put a change in to just always set the permissions to 600 in that function.
What's the provenance of the system in terms of what it was initially installed as? (i.e. has it been upgraded, charms upgraded, etc.) Thanks.
This is very odd as the place where this is set up is using ssh-keygen (which does the right thing with permissions) with this bit of code:
def initialize_ ssh_keys( user='root' ): user).pw_ dir join(home_ dir, '.ssh') isdir(ssh_ dir):
os.mkdir( ssh_dir)
home_dir = pwd.getpwnam(
ssh_dir = os.path.
if not os.path.
priv_key = os.path. join(ssh_ dir, 'id_rsa') isfile( priv_key) :
log('Generatin g new ssh key for user %s.' % user)
'-f', priv_key]
check_ output( cmd)
if not os.path.
cmd = ['ssh-keygen', '-q', '-N', '', '-t', 'rsa', '-b', '2048',
I wonder how it is getting changed to 644?
We could put a change in to just always set the permissions to 600 in that function.
What's the provenance of the system in terms of what it was initially installed as? (i.e. has it been upgraded, charms upgraded, etc.) Thanks.