Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

read_passphrase: can't open /dev/tty: No such device or address

How do I find out where the problem is? I can't move any further, even though I have the right configuration.

/dev/tty on remote server

root@kyle ~ # ls -la /dev/tty
crw-rw-rw- 1 root tty 5, 0 Aug 11 08:22 /dev/tty
INFO: Using passed SSH_KEY...
INFO: Adding known hosts...
INFO: Appending to ssh config file private key path
INFO: Applied file permissions to ssh directory.
Executing: program /usr/bin/ssh host, user cms, command scp -v -r -p -t /home/cms
OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d 10 Sep 2019
debug1: Reading configuration data /root/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/pipelines_id type -1
debug1: identity file /root/.ssh/pipelines_id-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Debian-10+deb9u3
debug1: match: OpenSSH_7.4p1 Debian-10+deb9u3 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to as 'cms'
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: MAC: <implicit> compression: none
debug1: kex: client->server cipher: MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:vwdKymSVIutzr7Z79SDWtp3XBut65h3S6OLbzXWt3a4
debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.
lost connection
✖ Deployment failed.



3 answers

I had the same issue. I solved this problem by

1. go to -> Repository settings

2. go to -> SSH keys ( on the left navigation)

3. at the known hosts section

- input your Bastion host public IP address

- then click Fetch button

- rerun your pipeline


Screen Shot 2022-05-31 at 12.04.57 PM.png

I got the same issue, lost already 3 hours looking for a solution.... anyone?

0 votes

Ok, this is about the build environment, not actually Bitbucket pipelines.

I can see you've checked /dev/tty is accessible to root on a machine, but have you checked it is accessible to the user cms on the build server?

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events