答案:#!/bin/bash# 请输入你的用户名 read -p "Username: " username# 请输入你的密码 read -sp "Password: " password# 连接服务器 echo "Connecting..." ssh "$username@example.com" -o PreferredAuthentications=password -o PubkeyAuthentication=no << EOF $password # 开始执行你的指令 # 例如:ls EOF
写一个bat自动登录ssh的脚本
最新推荐文章于 2024-05-23 10:37:50 发布