AnsibleKey sharinguvm26

Enabling key-based access from uvm1 to uvm26

The aadmin@uvm0 user needs to be able to connect via SSH as the aadmin user to uvm26.

Copying the public key to the managed node

Executed:

aadmin@uvm0:~$ ssh-copy-id aadmin@uvm26

Details

    aadmin@uvm0:~$ ssh-copy-id aadmin@uvm26
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/aadmin/.ssh/id_ed25519.pub"
    The authenticity of host 'uvm26 (192.168.2.126)' can't be established.
    ED25519 key fingerprint is SHA256:YjaCxj1K8A2Ae7OjsmgvtCzZ27xj/lsakL6veZua3es.
    This key is not known by any other names.
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    aadmin@uvm26's password:
 
    Number of key(s) added: 1
 
    Now try logging into the machine, with:   "ssh 'aadmin@uvm26'"
    and check to make sure that only the key(s) you wanted were added.
 

Testing the key-based access

Executed:

aadmin@uvm0:~$ ssh aadmin@uvm26

Details

    aadmin@uvm0:~$ ssh aadmin@uvm26
    Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-47-generic x86_64)
 
    * Documentation:  https://help.ubuntu.com
    * Management:     https://landscape.canonical.com
    * Support:        https://ubuntu.com/pro
 
    System information as of Fri Oct 18 07:36:55 PM UTC 2024
 
      System load:  0.0                Processes:               204
      Usage of /:   14.0% of 48.91GB   Users logged in:         0
      Memory usage: 6%                 IPv4 address for ens160: 192.168.2.126
      Swap usage:   0%
 
    * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
      just raised the bar for easy, resilient and secure K8s cluster deployment.
 
      https://ubuntu.com/engage/secure-kubernetes-at-the-edge
 
    Expanded Security Maintenance for Applications is not enabled.
 
    0 updates can be applied immediately.
 
    Enable ESM Apps to receive additional future security updates.
    See https://ubuntu.com/esm or run: sudo pro status
 
 
    To run a command as administrator (user "root"), use "sudo <command>".
    See "man sudo_root" for details.
 
 
    aadmin@uvm26:~$ exit
    logout
    Connection to uvm26 closed.

The SSH connection got established without a password request. Test passed.