时间:2021-07-01 10:21:17 帮助过:15人阅读
$con = ssh2_connect( 'IP', '22' ); if ( ssh2_auth_password( $con, 'root', 'root_pwd' ) ) { $stream = ssh2_exec( $con, "passwd test\n123456\n123456\n" ); //把用户名“test”的密码改成“123456” echo $stream; } else echo 'Cannot log in';