SSH Host key location for built-in ssh server (Apache Mina)

Joseph Nahmias January 25, 2021

Hello,

Where do I find the SSH host keys that are used by the embedded Apache Mina sshd server? For proper security, I need an out-of-band way to verify the keys -- either by executing some command on the machine hosting bitbucket or within the Bitbucket WebUI.

Thanks,
--Joe

1 comment

Joseph Nahmias January 27, 2021

Okay, I think I figured it out! Here's what I did:

  1. Find where on the server the host key is located. Go to Administration (gear icon) > Support > Troubleshooting and support tools page. Select the System Information tab, and for look the bitbucket.shared.home variable under the Java Runtime Environment heading.
  2. Then, on the server, run the following command, where ${BB_SHARED} is the variable from step 1:
$ openssl rsa -in ${BB_SHARED}/config/ssh-server-keys.pem -RSAPublicKey_out \
    | ssh-keygen -i -m PEM -f /dev/stdin

 

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events