I'll try to set up the bitbucket pipeline for my deployments. I'll add the pipeline to the bitbucket repository and configure the SSH keys correctly with Known hosts. after that, I'll run the ssh commands every time getting Host key verification failed This is my pipeline configuration
image: php:7.2
pipelines:
default:
- step:
name: "Logging to server"
script:
- apt-get update && apt-get install -y unzip
- apt-get install -y openssh-client
- echo "Trying to logging ..."
- ssh root@ip
And I already added the generated(from bitbucket ssh section) public key to my server's ~/.ssh/authorized_keys file. How can fix the issue.? (centos 7 server)
Pseudo-terminal will not be allocated because stdin is not a terminal.Host key verification failed.
When I run
ssh-keyscan -t rsa bitbucket.org
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAAB ...
Thanks.