Jump To: Support > KB > NetManager > Ssh > keygen
Setting up ssh keys for other NetManagers or Xenservers
On main NetManager, create an Ed25519 key pair (if id_ed25519 and id_ed25519.pub do not exist). There are different types of ssh keys, some are more secure than others. Earlier versions of this document used RSA keys (so id_rsa and id_rsa.pub would be used), but Ed25519 offers a more secure, faster, and more efficient alternative. If you have more than one type of key, they will be tried in order when connecting to a remote server. This is handy as older devices may not support Ed25519.
netmanager 1# ls ~/.ssh/ authorized_keys known_hosts netmanager 2# ssh-keygen -t ed25519 Generating public/private ed25519 key pair. Enter file in which to save the key (/root/.ssh/id_ed25519): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_ed25519 Your public key has been saved in /root/.ssh/id_ed25519.pub The key fingerprint is: SHA256:ehn9KJt5ok6FGLMlDUk5RLPcn9j7YS8Ix/XbRnCMQl8 root@netmanager The key's randomart image is: +--[ED25519 256]--+ | +*o | | .+* . E | | *.+ . . + | | B = oo + o | | o o.S..o o | | .oo+ o. . | | oo=.+ .+ | | . .oBoo. o | | .o.+o.... | +----[SHA256]-----+ netmanager 3# ls ~/.ssh/ authorized_keys id_ed25519 id_ed25519.pub known_hosts
When you have the keys in place, you can copy to the remote server (in this case called backup)
netmanager 4# scp ~/.ssh/id_ed25519.pub ncadmin@backup:
ncadmin@backup's password:
id_ed25519.pub 100% 395 0.4KB/s 0.4KB/s 00:00
@]
On remote NetManager:
backup 1# cd .ssh/ backup 2# cat ~ncadmin/id_ed25519.pub >> authorized_keys.local backup 3# chown root authorized_keys.local backup 4# chmod 600 authorized_keys.local backup 5# /usr/libexec/build/ssh
N.B. Do not place your public keys directly in /root/.ssh/authorized_keys as they will be lost whenever the server is updated or the ssh build script is run.
Or for XenServer (overwriting existing list of keys):
netmanager 5# scp ~/.ssh/id_ed25519.pub root@xenserver01:.ssh/authorized_keys root@xenserver01's password: id_ed25519.pub 100% 395 0.4KB/s 0.4KB/s 00:00


