1. 설치
yum -y install expect
2. ssh 자동 로그인
#vi /script/AutoConnect_ssh.sh#!/usr/bin/expect spawn ssh userid@host
expect -re "password: "
send "password\r"
interact
3. telnet 자동 로그인
#vi /script/AutoConnect_telnet.sh
#!/usr/bin/expect spawn ssh userid@host
expect -re "login: "
send "userid\r"
expect -re "password: "
send "password\r"
interact
댓글 없음:
댓글 쓰기