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

相关文章:

  • 淄博网站建设详细策划一个域名解析多个网站
  • 无锡网站建设首选捷搜网站优化大赛
  • 部门网站建设多少钱百度关键词挖掘查询工具
  • 做游戏直播那个网站asp做网站教程
  • 网站建设小程序开发情侣头像制作素材图片
  • spoc课程网站建设专业彩票网站建设
  • 创建网站需要注意什么忻州市城乡建设管理局网站
  • 万江做网站wordpress 动静
  • 北京自助模板建站遂宁企业网络推广方案
  • 湖南建设科技节能协会网站武夷山景区网站建设特点
  • 那些网站建设的好百度搜索风云排行榜
  • 网站开发 模板 c沈阳市建设工程质量检测中心网站
  • 企业网站设计专业好吗做钓鱼网站要具备什么
  • 广西备案工信部网站用asp.net做后台网站
  • 静态网站漏洞wordpress 外卖
  • 暗网做网站温州做网络推广的公司
  • 网站描述 修改上海火迎网络推广运营优化
  • 黄石网站建设哪家专业做个网站费用
  • 免费做的网站怎么设置域名解析宁夏百度seo
  • 化妆品产品的自建网站有哪些阿里云cdn wordpress错位
  • 增加网站流量网站新闻字体
  • 做外贸建网站需要推广吗服装如何做微商城网站
  • 上海市建设安全协会网站查询考试伪静态 wordpress
  • 网站免费建站o网站编程多少钱
  • 建设网站开发海外推广服务
  • 网站建设需要提供的资料文档营销平台建设
  • 做个响应式网站多少钱河南网络推广系统
  • wordpress的后台文章图文发布清远市seo广告优化
  • 长沙的互联网网站公司招标文件免费下载网站
  • icp备案系统网站品网站建设公司排名