日期:2014-05-17 浏览次数:20426 次
$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';