~ Continuation from the previous article ~ https://qiita.com/Naoki28/items/c77cc25585146fedd7d6
Carry out isolation using the -vv option
ssh -vv 192.168.33.10
・ ・ ・ Judging that it is difficult to find the cause from the huge output results I will try ssh connection referring to the following article
https://qiita.com/y_arakawa/items/7bb292c999873032e6a4
$ vagrant ssh-config
Write the above information in ~ / .ssh / config
$ vagrant ssh-config --host 192.168.33.10 >> ~/.ssh/config
apple-no-MacBook-Pro:centos7 apple$ ssh 192.168.33.10
Last login: Fri Dec 6 13:52:44 2019 from 10.0.2.2
I referred to the article and it worked!
#!/bin/sh
expect -c "
set timeout 10
spawn /usr/bin/ssh 192.168.33.10
expect \"$\"
send \"ls-al\"
"
Output result
spawn /usr/bin/ssh 192.168.33.10
First of all, I want to log in automatically so that I can type even one command ... Next time I plan to explore the bad parts of the migration shell
Recommended Posts