当前位置: 首页 > news >正文

个人网站 做导航北京市运动会网站建设

个人网站 做导航,北京市运动会网站建设,自建网站和第三方平台,清远最新消息介绍:我们在部署无密码访问时,如果手工输入.很费时间.下面方法用于自动化生成authorized_keys,免去了手工数据.方法: 利用expect编写sshkey.exp在远程主机上生成id_rsa,并重定向到本地.在利用noscp.exp.把文件复制到远程主机步骤:(本方法在centos6.4 上验证通过)1 本地执行ssh-…介绍:我们在部署无密码访问时,如果手工输入.很费时间.下面方法用于自动化生成authorized_keys,免去了手工数据.方法: 利用expect编写sshkey.exp在远程主机上生成id_rsa,并重定向到本地.在利用noscp.exp.把文件复制到远程主机步骤:(本方法在centos6.4 上验证通过)1 本地执行ssh-keygen -t rsa2 编写脚本生成 authorized_keys (比如现在有cloud1 和 cloud2 服务器)./sshkey.exp  cloud1 root root123 | grep ssh-rsa ~/.ssh/authorized_keys./sshkey.exp  cloud2 root root123 | grep ssh-rsa ~/.ssh/authorized_keys3 对于需要建立免密码输入的,把文件拷贝上去./noscp.exp ~/.ssh/authorized_keys cloud1:~/.ssh root root123./noscp.exp ~/.ssh/authorized_keys cloud2:~/.ssh root root1234. 脚本说明./sshkey.exp  主机名 用户名  密码  (在远程主机生成id_rsa)./noscp.exp   本地文件 远程路径  远程用户密码   (无密码拷贝文件)注意:每个主机上必须安装 openssh-clients#!/usr/bin/expect#sshkey.expif {$argc3} {puts stderr Usage: $argv0 host  user  passwd exit 1}set host [ lindex $argv 0 ]set user  [ lindex $argv 1 ]set pwd  [ lindex $argv 2 ]set timeout 30#spawn ssh  ${user}${host} rm -rf ~/.ssh/id_rsa*##expect {# *yes/no { send yes\r; exp_continue }# *password: { send $pwd\r; exp_continue  }#}spawn ssh  ${user}${host} ssh-keygen -t rsaexpect {*yes/no { send yes\r; exp_continue }*password: { send $pwd\r; exp_continue  }Enter file in which to save the key* { send \n\r; exp_continue }Overwrite* { send y\n; exp_continue }Enter passphrase (empty for no passphrase): { send \n\r; exp_continue }Enter same passphrase again: { send \n\r }}spawn ssh  ${user}${host} cat ~/.ssh/id_rsa.pubexpect {*yes/no { send yes\r; exp_continue }*password: { send $pwd\r  }}expect eof#!/usr/bin/expect#noscp.expif {$argc4} {puts stderr Usage: $argv0 localfile  remotefile user passwd exit 1}set localfile [ lindex $argv 0 ]set remotefile  [ lindex $argv 1 ]set user  [ lindex $argv 2 ]set pwd  [ lindex $argv 3 ]set timeout 30spawn scp ${localfile}  ${user}${remotefile}expect {*yes/no { send yes\r; exp_continue }*password: { send $pwd\r }}expect eof
http://www.pierceye.com/news/601690/

相关文章:

  • 网站后台管理员密码汽车网站更新怎么做
  • 广东省网站备案查询怎么建设网站空间和备案
  • 企业网站软件下载红木家具网站模板
  • 如何创建网站步骤湖北网站制作公司的联系方式
  • 佛山建网站费用seo推广效果怎么样
  • 如何选择网站建设公司永州网页定制
  • 淮北市重点工程建设局网站重庆哪家网站
  • 音乐网站开发背景及意义自定义建设网站
  • 商标设计网站猪八戒宝塔一键wordpress
  • 公司网站用什么开发网站 建设 计划书
  • 安陆市城乡建设局网站w10怎么做信任网站
  • wordpress上站工具内网门户网站
  • 商城网站服务器漳浦建设银行网站
  • 可视化 网站开发工具音乐网站后台管理模板
  • 网站架构功能模块及描述网站聊天怎么做
  • 京东电子商务网站的建设做网站运营需要什么资源
  • 市北建筑建网站哪家好个体户可以做网站吗
  • 怎么建自己的网站?网站优化包括哪些内容
  • 网站后台登录域名国外网站网站app
  • 山西建设工程协会网站wordpress二次元主题个人
  • 加强人社局网站建设获取小程序api
  • 服务器网站备案学生ppt模板免费下载 素材
  • 手机做网站软件运营管理培训
  • 迅博威网站建设南宁 建网站 公司
  • 河北省建设机械协会是正规网站吗网站及网页设计费用
  • 门户网站seo前期铁岭网站建设移动网站
  • 肇庆免费模板建站jsp电商网站开发流程图
  • 阿里巴巴国际站网站建设青岛网站搭建公司哪家好
  • 能看人与动物做的网站浙江企业响应式网站建设设计
  • 乌兰察布做网站公司营销策划公司有哪些职位