I have connected to one server ServerA and from this ServerA, i need to do ssh connection to ServerB and then execute my queries.
#!/usr/bin/expect
spawn ssh Myusername@ServerB
expect "password"
send "Mypassword\r"
interact
Output.ksh[3]: spawn: not found [No such file or directory]
couldn't read file "password": no such file or directory
Output.ksh[5]: send: not found [No such file or directory]
Output.ksh[6]: interact: not found [No such file or directory]
Getting the above error when i tried to run the above code.
But once the ssh connection is established, it is not picking up the rest of the queries which are there in the shell script. Do we need to put any different command to run this.
I need to execute nz_migrate commands. for nz_migrate we need to use either source host or target host. My automated shell scripts are on different host(Server C) and i need to migrate the data from Server A to Server B( so i need to do ssh connection for Server B and execute the migrate on Server B).
With problem statements like this, guesswork - be it using a crystal ball or not - is and will always stay piecemeal.
How about showing the shell script that is not picked up?