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