Repalce the code
expect {
"password:" { send "$vcs_password\r" }
eof { exit 0 }
}
by
expect {
"assword:" { send "$vcs_password\r" }
eof { exit 0 }
}
In some systems the ssh client produces the promt
"Password" in others it uses "password" the expect
script should expect both.