I have a bitbucket account. I'm trying to build pipelines using sftp deploy, the problem comes when I change my ssh port. When I commit, the output deployment fails.
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server-> client cipher: firstname.lastname@example.org MAC: <implicit> compression: none
debug1: kex: client-> server cipher: email@example.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256: WgnXplwkwYNXMVdzcKpILAlYZJ43Y7mm / qMNdHyZ7Fk
debug1: checking without port identifier
Host key verification failed.
+ STATUS = 255
+ set -e
+ [[255 == \ 0]]
+ file 'Deployment failed.'
+ echo -e '\ e [31m✖ Deployment failed. \ e [0m'
+ exit 255
✖ Deployment failed.
This is my bitbucket-pipelines.yml config.
image: python: 3.7.3
name: Build and test
- pip install - upgrade pip
- git clone firstname.lastname@example.org: linuxteknosia / codeku.git
- my code / **
name: Deploy artifacts using SFTP to PROD
- pipe: atlassian / sftp-deploy: 0.5.0
USER: $ USER
SERVER: $ SERVER
SSH_KEY: $ SSH_KEY
REMOTE_PATH: '/ var / www / html'
LOCAL_PATH: 'my code / *'
EXTRA_ARGS: '-P 999'
Strangely, when the ssh port uses port 22, the config is successfully committed to the server. Can you help where the fault lies?
Hi @linuxteknosia , try adding your host:port to the list of known hosts in pipelines settings, as described here https://community.atlassian.com/t5/Bitbucket-questions/Use-non-22-SSH-port-in-pipelines/qaq-p/585622 .
Go to the Repository settings > Pipelines > SSH Keys , enter the host:port into the 'Host address' field under the Known hosts section and click Fetch. This should add and known_hosts entry with a specific port number.
If the above steps don't help, try removing all entries from known hosts settings and add fresh fingerprints instead.
i'm having same issue. put host:port gets the fingerprint and i can add the host. but the pipeline process don't work, i got "Host key verification failed". if i put just the host without port, the fingerprint is not found.
remove entries from known hosts and add again, doesn't help
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events