shell小白 想玩自動化部署,無密碼ssh 登陸遠程服務器,執行scp命令傳送war包 並重啓tomcat。

一個演示demo,首先scp命令 發送 test.clss 到遠程服務器登陸目錄(能夠指定目錄,真實環境應該指定到tomcat安裝目錄的webapps 文件夾目錄下),並會ssh鏈接登陸到服務器。若是沒有配置無密碼shh登陸會要求你輸入兩次密碼。web #!/bin/sh scp test.class root@115.159.120.64: ssh root@115.159.120.64 #
相關文章
相關標籤/搜索