I am facing an issue when I run simply these commands.
The remote server want to pass "yes" to add the key in RSA file because first time connection established with scp.
commands are given below
#!/bin/bash
scp -P58222 root@IP:/root/K /N
/usr/bin/expect -c 'expect "\n" { expect "Are you sure you want to continue connecting (yes/no)?" }'
send "yes\r"
expect "$ "
send "exit\r"
Actually I have to pass yes
in my script while showing
Are you sure you want to continue connecting (yes/no)?
how can i get rid of this problem..?