Contents
- Create a mobile key locally and separate it from other devices
- Choose the algorithm according to the actual client and server
- Set the protection and generate a new pair
- Save the result and check the public part
- Enter the public key for the correct account.
- Connect your profile and test your new login
- The backup and subsequent rotation are as important as the creation
- When the new key doesn't work
- Frequently asked questions
App screenshots

Create a mobile key locally and separate it from other devices
An SSH key pair can be created directly on the phone without generating it on the server and then sending the private part back. For the average administrator, a separate key for a specific device is useful. If you lose or replace a phone, you can remove its public key from the servers and keep other trusted accesses in operation.
Generating is just the first step. To log in with a key, the client must be able to use the private part, the server must accept the appropriate authentication method, and the public part must be authorized for the correct account. The file created by the generator itself does not change the SSH server settings or grant root privileges.
In CH-J Tools Mobile 0.0.4, both a local generator and a Keychain section are available. Verify specific builds for iOS and iPadOS in TestFlight. Start with one test account and a harmless operation; only after verifying recovery and login, deploy the key to other important servers.
Choose the algorithm according to the actual client and server
For common modern SSH authentication, Ed25519 is a practical choice if both parties and their operating policies support it. However, it is not post-quantum secure. RSA may be required for specific compatibility or environmental rules; however, the RSA key size and the signature algorithm used are not the same.
Don't enable legacy signatures just because you saw ssh-rsa in the server menu. The label can refer to a public key type or a historical signature based on SHA-1, depending on the context. A modern RSA key can work with SHA-2 signatures without enabling the old scheme. The error message needs to be read in the exact context of the negotiation.
The mobile generator may also offer keys that the built-in mobile SSH client cannot use to log in. For example, in the 0.0.4 series, creating or exporting post-quantum material does not demonstrate support for ssh-mldsa44-ed25519 authentication in the connection itself. Also, do not confuse the authentication key with the key exchange algorithm for transport encryption.
Set the protection and generate a new pair
Unlock Vault, open the key section and generator. Select the SSH family, supported algorithm, and appropriate private key format. For clients working with OpenSSH, the OpenSSH format is usually the appropriate format. If you need a different format, verify its support with the specific recipient instead of randomly switching through all the options.
Add a clear comment, for example, phone-admin-2026. The comment helps with registration, but is not an access rule and can be changed. Do not include passwords or other confidential information in the comment. The service will not log you in just because the text in the comment resembles the account name.
Use a strong, unique passphrase for the exported private section and store it securely. It is different from both the Vault master password and the server account login password. For supported combinations, choose encrypted output; locking the application itself does not protect the unencrypted copy you have already stored outside of its storage.
Save the result and check the public part
After generation, consciously save the identity to Keychain and verify that you can find it when you return. Do not consider a temporary preview of the result as a permanent backup without checking. The interface may offer different steps for saving, copying, and exporting; each of them has a different purpose and handles private material differently.
A public SSH key for authorization usually takes the form of a single line of text starting with a type, followed by encoded data and a possible comment. You can recognize a private key in OpenSSH format by the corresponding PRIVATE KEY header. On the server, authorized_keys includes the public part, never the private key block.
Note the fingerprint of the public part and its binding to the device. You can view it independently on a computer running OpenSSH with the following command. The path refers to the public file that you securely transferred; it is not an instruction to export the private part from the phone.
ssh-keygen -lf telefon-spravce.pubEnter the public key for the correct account.
Give the public part to the server administrator with existing trusted access or authorize it according to local rules. For a typical OpenSSH user setup, the target is ~/.ssh/authorized_keys for the appropriate account. However, the server may have a different path, central administration, or certification authority. Therefore, do not infer the actual authorization mechanism from the file name alone.
When adding, preserve other valid keys and their possible restrictive options. Do not overwrite the entire file with a single newline. Check the owner and permissions of the directory and file; the server may reject an unsafely writable path. The values 700 for the directory and 600 for the file are common for simple user setup, not a substitute for checking the entire path and server policy.
Do not transfer the private key to the server home directory as part of this operation. The server needs the public key to verify the signature of the logging client. If the instructions require uploading the private part only for normal phone logins, it confuses the roles of both parties and unnecessarily extends access to the secret.
Connect your profile and test your new login
In the mobile profile, select the correct host, port, and username, and select the saved SSH identity. Before connecting for the first time, independently verify the server fingerprint. The server host key fingerprint and your user public key fingerprint are two different things. The former authenticates the peer, the latter identifies the login identity.
After logging in, perform a harmless account and host check. Verify that you did not use a stored password as a substitute authentication. Resolution may require client data or server authentication logs available to the administrator. The mere display of the terminal does not prove that the new key login is working.
whoami
hostname
pwdLeave the original functional access for the verification period. Disabling passwords or removing old keys should only be handled as a separate approved change after testing the new path and recovery. A freshly opened phone should not be the only point on which your ability to repair the server depends at that moment.
The backup and subsequent rotation are as important as the creation
Decide whether the mobile key should be recoverable from an encrypted backup or easily replaceable with a new key through independent admin access. Both approaches require a plan. Without a backup, you can lose convenient access; without the ability to deauthorize, a lost device can remain a risk to all servers.
Export the private part selectively and control the storage location. The sharing dialog may pass the content to a cloud provider or another application. When finished, delete unnecessary working copies according to the storage properties; simply deleting from one folder may not delete the history of the synced service.
Keep a record of servers and accounts where public key is enabled. When rotating, first add and test the new identity, then remove the old one and verify the result. If a leak is suspected, the order must be adapted to the incident. Removing the identity from the phone itself will not revoke authorization on remote hosts.
When the new key doesn't work
The error can be caused by selecting a different profile, account, or private key, by an incorrectly inserted public key, by permissions, or by server policy. Distinguish between an authentication refusal and a failed key opening or decryption. Changing the port or disabling host checking does not resolve these issues by default.
Provide the administrator with the time of the attempt, the account, and the public key fingerprint, and possibly a sanitized error message. Do not send the private key or its passphrase for diagnostics. If the server accepts a different algorithm, suggest an appropriate supported identity according to the environment rules; do not enable historical mechanisms across the board without consideration.
- The new pair was created in a trusted application and is saved.
- The private part has adequate protection and a clear recovery plan.
- The server only received the public part for the correct account.
- The new login was actually verified before the old path was canceled.
- Do you know where to remove authorization if you lose your phone?
Frequently asked questions
Do I need to generate an SSH key on a Linux server?
No. For phone login, you can create it locally and pass only the public part to the server.
Does the private key belong to authorized_keys?
No. This file normally contains authorized public keys and any options.
Is it enough to delete the key on the phone when it is discarded?
No. It is necessary to remove its authorization on the relevant servers.
Does the generator guarantee post-quantum login by the mobile client?
No. Generating, using for authentication, and exchanging transport keys are separate capabilities.
Detailed documentation
OpenSSH: key generation and management →
OpenSSH: authorization and authorized_keys format →