I am writing a shell script for automating the kubectl commands of uploading a file on the SFTP server. I am using the below sequence of commands and want to shell script them:
winpty kubectl --kubeconfig="C:\kubeconfig" -n namespace exec -it podname -- bash -c "sftp username"
Are you sure you want to continue connecting (yes/no)?: yes
Enter password: *******
cd foldername
put filename
I can shell script the first command then it will ask for a prompt yes/no?. Stuck there.