4,436
社区成员
发帖
与我相关
我的任务
分享
#! /usr/bin/expect
set timeout 10
spawn ssh ladmin@192.168.124.23
expect "*assword:" { send "l*kj@19\r" }
spawn su - root
expect "密码*" { send "system\r"}
send "pwd\r"
interact
[ladmin@localhost ~]$ spawn su - root
密码:
su: 认证失败