public UpdateServerRequest withHostKey(String hostKey) {
        setHostKey(hostKey);
        return this;
    }
<p>
The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in
case you want to rotate keys, or have a set of active keys that use different algorithms.
</p>
<p>
Use the following command to generate an RSA 2048 bit key with no passphrase:
</p>
<p>
<code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.
</p>
<p>
Use a minimum value of 2048 for the <code>-b</code> option. You can create a stronger key by using 3072 or 4096.
</p>
<p>
Use the following command to generate an ECDSA 256 bit key with no passphrase:
</p>
<p>
<code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.
</p>
<p>
Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.
</p>
<p>
Use the following command to generate an ED25519 key with no passphrase:
</p>
<p>
<code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.
</p>
<p>
For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.
</p>
<important>
<p>
If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't
update the host key. Accidentally changing a server's host key can be disruptive.
</p>
</important>
<p>
For more information, see <a href=
"https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key"
>Manage host keys for your SFTP-enabled server</a> in the <i>Transfer Family User Guide</i>.
</p>

@param hostKey
       The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host
       keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.</p>
       <p>
       Use the following command to generate an RSA 2048 bit key with no passphrase:
       </p>
       <p>
       <code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.
       </p>
       <p>
       Use a minimum value of 2048 for the <code>-b</code> option. You can create a stronger key by using 3072 or
       4096.
       </p>
       <p>
       Use the following command to generate an ECDSA 256 bit key with no passphrase:
       </p>
       <p>
       <code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.
       </p>
       <p>
       Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.
       </p>
       <p>
       Use the following command to generate an ED25519 key with no passphrase:
       </p>
       <p>
       <code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.
       </p>
       <p>
       For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.
       </p>
       <important>
       <p>
       If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server,
       don't update the host key. Accidentally changing a server's host key can be disruptive.
       </p>
       </important>
       <p>
       For more information, see <a href=
       "https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key"
       >Manage host keys for your SFTP-enabled server</a> in the <i>Transfer Family User Guide</i>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-transfer/src/main/java/com/amazonaws/services/transfer/model/UpdateServerRequest.java