8月 102016
 

1、ssh公钥认证

ssh-keygen
ssh-copy-id

2、setsid

[root@rhos ~]# echo 'date'|setsid env SSH_ASKPASS='/opt/passwd.sh' DISPLAY='none:0' ssh root@192.168.0.254 2>&1
Pseudo-terminal will not be allocated because stdin is not a terminal.
2016年 08月 10日 星期三 22:37:19 CST
[root@rhos ~]# more /opt/passwd.sh 
#!/bin/bash
echo 'PASSWORD'

3、expect

 Posted by at 下午9:3740 views

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)