Some Scripts

来源:互联网 发布:知乎怎样回答问题 编辑:程序博客网 时间:2024/06/05 11:32
  • 登录服务器BeiJing
#!/bin/baship="x.x.x.x"ssh -i ~/.ssh/xxxx_id_rsa xxx@$ip
  • 登录another method
#!/usr/bin/expect -fspawn ssh -p xxxx(digital) -i ~/.ssh/xxx.key  xxx@x.x.x.xexpect "xxx@xxx:~$"send "su - xxx\n"expect "Password:"send "xxxxx\n"expect "id_rsa"send "xxxx\n"interact
  • 传输包到服务器脚本,带证书
xxx$ cat xxx.sh#!/bin/bashscp -i ~/.ssh/xx_id_rsa ~/IdeaProjects/xxx/xxx/target/xx-xx.jar xx@xx-xx-xx:/xxx/xx/xx/xx-xx/xxx
原创粉丝点击