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

用node.js可以做网站吗上海做网站 公司有哪些

用node.js可以做网站吗,上海做网站 公司有哪些,运城做网站的公司,用ps做租房网站里的图标大小本公司是通过齐治堡垒机连接远程服务器的环境#xff0c;因为连接过程中需要自动输入密码和选择主机#xff0c;所以要使用expect工具#xff0c;编写expect脚本remote.exp #!/usr/bin/expectif { $argc ! 7 } {send_user usage: expect $argv0 \[JUMP_HOST\] \[JUM…本公司是通过齐治堡垒机连接远程服务器的环境因为连接过程中需要自动输入密码和选择主机所以要使用expect工具编写expect脚本remote.exp  #!/usr/bin/expectif { $argc ! 7 } {send_user usage: expect $argv0 \[JUMP_HOST\] \[JUMP_PORT\] \[JUMP_USER\] \[JUMP_PASSWORD\] \[HOST\] \[USER\] \[PASSWORD\]\n\n\tsend_user *JUMP开头\t是堡垒机的登录信息\n\tsend_user *非JUMP开头\t是连接目标主机的登录信息.exit }set timeout 5set jump_host [lindex $argv 0] set jump_port [lindex $argv 1] set jump_user [lindex $argv 2] set jump_pswd [lindex $argv 3] set host [lindex $argv 4] set user [lindex $argv 5] set pswd [lindex $argv 6]# 连接堡垒机 spawn ssh -p$jump_port $jump_user$jump_host # 登录堡垒机 expect {*(yes/no*)? {send yes\rexpect *assword:send $jump_pswd\r}# 接受到password输入密码*assword: {send $jump_pswd\r} } # 选择登录主机 expect {*: {send $host\r} } # 选择登录用户 1 是 any expect {*: {send 1\r} } # 输入主机用户 expect {*login: {send $user\r} } # 输入主机密码 expect {*assword: {send $pswd\r} }interact 配置iterm2 profile Send text at start: /Users/aaa/scripts/remote.exp 堡垒机ip 堡垒机ssh端口 堡垒机ssh用户 堡垒机ssh密码 跳转主机ip 跳转主机ssh用户 跳转主机ssh密码 配置lrzsz mac上传脚本根据自己rz sz命令路径修改recv cat /usr/local/bin/iterm2-recv-zmodem.sh#!/bin/bash # Author: Matt Mastracci (matthewmastracci.com) # AppleScript from http://stackoverflow.com/questions/4309087/cancel-button-on-osascript-in-a-bash-script # licensed under cc-wiki with attribution required # Remainder of script public domainosascript -e tell application iTerm2 to version /dev/null 21 NAMEiTerm2 || NAMEiTerm if [[ $NAME iTerm ]]; thenFILEosascript -e tell application iTerm to activate -e tell application iTerm to set thefile to choose folder with prompt Choose a folder to place received files in -e do shell script (\echo \(quoted form of POSIX path of thefile as Unicode text)\\) elseFILEosascript -e tell application iTerm2 to activate -e tell application iTerm2 to set thefile to choose folder with prompt Choose a folder to place received files in -e do shell script (\echo \(quoted form of POSIX path of thefile as Unicode text)\\) fiif [[ $FILE ]]; thenecho Cancelled.# Send ZModem cancelecho -e \\x18\\x18\\x18\\x18\\x18sleep 1echoecho \# Cancelled transfer elsecd $FILE/opt/homebrew/bin/rz -E -e -bsleep 1echoechoecho \# Sent \-\ $FILE fi send cat /usr/local/bin/iterm2-send-zmodem.sh #!/bin/bash # Author: Matt Mastracci (matthewmastracci.com) # AppleScript from http://stackoverflow.com/questions/4309087/cancel-button-on-osascript-in-a-bash-script # licensed under cc-wiki with attribution required # Remainder of script public domainosascript -e tell application iTerm2 to version /dev/null 21 NAMEiTerm2 || NAMEiTerm if [[ $NAME iTerm ]]; thenFILEosascript -e tell application iTerm to activate -e tell application iTerm to set thefile to choose file with prompt Choose a file to send -e do shell script (\echo \(quoted form of POSIX path of thefile as Unicode text)\\) elseFILEosascript -e tell application iTerm2 to activate -e tell application iTerm2 to set thefile to choose file with prompt Choose a file to send -e do shell script (\echo \(quoted form of POSIX path of thefile as Unicode text)\\) fi if [[ $FILE ]]; thenecho Cancelled.# Send ZModem cancelecho -e \\x18\\x18\\x18\\x18\\x18sleep 1echoecho \# Cancelled transfer else/opt/homebrew/bin/sz $FILE -e -bsleep 1echoecho \# Received $FILE fi 配置Triggers Regular expression: rz waiting to receive.\*\*B0100Action: Run Silent CoprocessParameters: /usr/local/bin/iterm2-send-zmodem.shInstant: checkedRegular expression: \*\*B00000000000000Action: Run Silent CoprocessParameters: /usr/local/bin/iterm2-recv-zmodem.shInstant: checked * 如果是通过expect方式登录的服务器需要做一下配置写一个shell脚本加入               export LC_CTYPEen_US #!/bin/bash # $1 是expect脚本其他的参数就是登录堡垒机和服务器的参数if [ $# -ne 8 ];thenecho -e usage: $0 [EXPECT_SCRIPT_PATH] [JUMP_HOST] [JUMP_PORT] [JUMP_USER] [JUMP_PASSWORD] [HOST] [USER] [PASSWORD]\n\n\techo -e *JUMP开头\t是堡垒机的登录信息\n\techo -e *非JUMP开头\t是连接目标主机的登录信息.exit fiexport LC_CTYPEen_US/usr/bin/expect $1 $2 $3 $4 $5 $6 $7 $8# 运行示例# bash /Users/test_user/scripts/login.sh /Users/test_user/scripts/remote.exp 172.88.88.88 22 test_user test_user_password 172.77.77.77 root root_password# 如果使用了这种方式的话iterm2 profile 也需要对应的修改一下
http://www.pierceye.com/news/386213/

相关文章:

  • 网站的模块怎么做网站建设的技术支持包括
  • 青岛网站设计哪家好游戏小程序开发定制
  • 建设网站西丽提升网站建设品质
  • 大良营销网站建设方案广东东莞划定多个高风险区
  • 毕业设计做网站用什么品牌网站建设新闻
  • c 网站开发用的人多吗做it行业招标网站有哪些
  • 招聘做牙技工的网站用html框架做网站
  • 本地wordpress站点上传央企网站群建设
  • 广州免费自助建站开发wordpress公园
  • 淘宝客建网站简单网站建设优化推广
  • 长沙做网站找哪家好毕业设计开题报告网站开发
  • 可以写代码的网站有哪些问题吗网页设计与网站建设期末考试试卷
  • 美工做网站怎么收费网站设计规范
  • 建网站需要注意的问题企业整合营销
  • 2018网站开发的革新wordpress 更新数据库
  • 做现金贷的网站有哪些如何自己建立一个网站
  • 网站制作公司前十名wordpress保存的字体大小
  • 网站设计思路方案海外购物网站哪个最好
  • 哪个网站做课件能赚钱青岛制作网站的
  • 深圳做网站排名公司哪家好html网页设计实训报告范文
  • 外贸网站开发做动画 的 网站有哪些软件下载
  • 中国建设银行吉林省分行官网站wordpress形式
  • 做门户网站可以用的字体黑龙江建设教育网站
  • 怎么做网站建设赚钱知名品牌设计logo解析
  • wordpress全站静态化做公司网站 找谁做
  • 广安网站建设哪家好网站模板下载网站
  • 游戏怎么做充值网站wordpress 预约主题
  • 珠海做网站三年多少钱免费ai写作网站3000字
  • 陕西建设网综合服务中心网站跨境电商怎么搞
  • 青岛做网站需要多少钱怎么在网上卖东西赚差价