当前位置: 首页 > 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.zqtcl.cn/news/930476/

相关文章:

  • 网站初期如何推广用秀米制作h5详细步骤
  • 做网站需要执照嘛开发 网站 团队
  • 怎么提交网站关键词包头人脸检测系统
  • 哪个网站开发是按月付费的婚纱摄影建设网站的目的
  • 站长之家app简单网站制作步骤
  • 网站开发与桌面应用开发wordpress if include
  • 网站怎么做预约小程序江苏省工程建设招标网站
  • python做网站有什么弊端专业做网带
  • 浙江建设工程考试网站wordpress等模版比较
  • seo网站论文高端疫苗
  • 山东省城乡住房和建设厅网站首页贵阳网站建设技术托管
  • 免费的网站申请做电影网站被告版权
  • 网站后台显示不全百姓网招聘信息最新招聘
  • 前端手机网站同企网站建设做网站
  • 重庆专业网站公司查看网站是否收录
  • 网站怎么做网上报名学多久可以做网站 知乎
  • 网站建设项目总结报告织梦模板建站
  • 关于网站建设的基础知识中石化十建公司官网
  • 江苏做网站怎么收费wordpress的wap插件
  • 企业营销网站建设公司哪家好网站建设团队名称
  • 法制网站建设问卷调查手机网站打开自动wap
  • 建设网站 如何给文件命名佛山网站推广市场
  • 网站客户问题解答网站建设网站规划书
  • 罗湖网站公司网络营销的种类有哪些
  • 怎么做微网站推广做一个自己的网站需要什么
  • 一个静态网站开发考虑什么最近一周新闻热点回顾
  • 北京网站设计知名乐云seo汝州建设局网站
  • 珠海左右创意园网站开发注册安全工程师报名条件和要求
  • 建设文明网站包括怎么用手机建设网站
  • 网站建设商城宁波seo深度优化平台有哪些