u
This commit is contained in:
		
							parent
							
								
									def5a4049c
								
							
						
					
					
						commit
						24f331e898
					
				| @ -1,6 +1,6 @@ | |||||||
| #!/usr/bin/expect | #!/usr/bin/expect | ||||||
| 
 | 
 | ||||||
| # Usage: expect this.sh [hostname] [username] [password] | # Usage: expect this.sh [hostname] [username] [pwdadot] [pwdroot] | ||||||
| 
 | 
 | ||||||
| set timeout 30 | set timeout 30 | ||||||
| spawn ssh [lindex $argv 1]@[lindex $argv 0] -p 22 | spawn ssh [lindex $argv 1]@[lindex $argv 0] -p 22 | ||||||
| @ -12,8 +12,8 @@ expect { | |||||||
|   ":~" |   ":~" | ||||||
|   {send "su\n";exp_continue} |   {send "su\n";exp_continue} | ||||||
|   "Password:" |   "Password:" | ||||||
| #  {send "[lindex $argv 3]\ncd /faronear\n"} |   {send "[lindex $argv 3]\ncd /faronear\n"} | ||||||
| #  "密码:" | #  "密码:" | ||||||
|   {send "[lindex $argv 2]\ncd /faronear\n"} | #  {send "[lindex $argv 3]\ncd /faronear\n"} | ||||||
| } | } | ||||||
| interact | interact | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user