Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1380512
  • 博文数量: 77
  • 博客积分: 2104
  • 博客等级: 大尉
  • 技术积分: 2322
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-19 13:21
个人简介

关注于系统高可用、网站架构

文章分类

全部博文(77)

文章存档

2018年(1)

2017年(1)

2015年(4)

2014年(8)

2013年(4)

2012年(12)

2011年(17)

2010年(30)

分类: LINUX

2012-08-28 17:38:50

 
:~# ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
19:3e:2f:fe:47:28:a6:af:1f:c5:7b:04:6a:36:dc:c7
 
:~# cd /root/.ssh/
# mv id_rsa tts
 
下载公钥、私钥文件
 
使用securecrt 的tools--convert private key to openssh
 
puppet
cat 导入,避免出现空格
增加公钥
/etc/puppet/modules/user/templates
用户
/etc/puppet/modules/user/templates
more tts.pp
class user::add::tts inherits user::add {
    add_user {"tts":
        useruid     => "655",
        username    => "tts",
        userhome    => "tts",
        groups      => "admin",
        gid         => "610",
        usershell   => "/bin/bash",
    }
}
~
最后重启目标服务器的sshd服务
阅读(2865) | 评论(0) | 转发(0) |
0

上一篇:puppet 常用命令

下一篇:ssd 使用寿命检查

给主人留下些什么吧!~~