$ lab start ssh-configure Starting lab. · Checking lab systems .................................................................. SUCCESS · Ensure the required packages are installed ............................................ SUCCESS · Ensure the operator1 user exist ....................................................... SUCCESS [student@workstation ~]$ ssh student@serverb Activate the web console with: systemctl enable --now cockpit.socket Register this system with Red Hat Insights: insights-client --register Create an account or view all your systems at https://red.ht/insights-dashboard Last login: Mon Jul 1 05:10:28 2024 [student@serverb ~]$ su - operator1 Password: [operator1@serverb ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/operator1/.ssh/id_rsa): Created directory '/home/operator1/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/operator1/.ssh/id_rsa Your public key has been saved in /home/operator1/.ssh/id_rsa.pub The key fingerprint is: SHA256:J6u9k5o92dzRZ74cYeOq09yW2S1N6q6xW4v7fvkPO74 operator1@serverb.lab.example.com The key's randomart image is: +---[RSA 3072]----+ | | | | | | | | | S . . + | | + . + *| | .= .+.+X*| | == o..B*XB| | +.++ .O@EB*| +----[SHA256]-----+ [operator1@serverb ~]$ ssh-copy-id operator1@servera /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/operator1/.ssh/id_rsa.pub" The authenticity of host 'servera (172.25.250.10)' can't be established. ED25519 key fingerprint is SHA256:G8DLQ9w11XotR51HOU7Y23MLhnoQvKq8luZY+5zSQb0. 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 operator1@servera's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'operator1@servera'" and check to make sure that only the key(s) you wanted were added. [operator1@serverb ~]$ ssh operator1@servera hostname servera.lab.example.com [operator1@serverb ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/operator1/.ssh/id_rsa): /home/operator1/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/operator1/.ssh/id_rsa Your public key has been saved in /home/operator1/.ssh/id_rsa.pub The key fingerprint is: SHA256:D5u5PgxlvLe7FxGndrn+6AH8jw+CCJVbJWaCBvPOd6o operator1@serverb.lab.example.com The key's randomart image is: +---[RSA 3072]----+ | o. .. + . | | oo = o. . | | ...o . + . | | o .+o .+ o | | +oS...oo . | | .o.X...o. | | o*.o..o+ | | .o.. ...* | | E.o.o+ .+o+| +----[SHA256]-----+ [operator1@serverb ~]$ ssh operator1@servera hostname operator1@servera's password: [operator1@serverb ~]$ ssh -v operator1@servera hostname OpenSSH_8.7p1, OpenSSL 3.0.7 1 Nov 2022 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Reading configuration data /etc/ssh/ssh_config.d/01-training.conf debug1: /etc/ssh/ssh_config.d/01-training.conf line 1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug1: configuration requests final Match pass debug1: re-parsing configuration debug1: Reading configuration data /etc/ssh/ssh_config debug1: Reading configuration data /etc/ssh/ssh_config.d/01-training.conf debug1: /etc/ssh/ssh_config.d/01-training.conf line 1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug1: Connecting to servera [172.25.250.10] port 22. debug1: Connection established. debug1: identity file /home/operator1/.ssh/id_rsa type 0 debug1: identity file /home/operator1/.ssh/id_rsa-cert type -1 debug1: identity file /home/operator1/.ssh/id_dsa type -1 debug1: identity file /home/operator1/.ssh/id_dsa-cert type -1 debug1: identity file /home/operator1/.ssh/id_ecdsa type -1 debug1: identity file /home/operator1/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/operator1/.ssh/id_ecdsa_sk type -1 debug1: identity file /home/operator1/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /home/operator1/.ssh/id_ed25519 type -1 debug1: identity file /home/operator1/.ssh/id_ed25519-cert type -1 debug1: identity file /home/operator1/.ssh/id_ed25519_sk type -1 debug1: identity file /home/operator1/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /home/operator1/.ssh/id_xmss type -1 debug1: identity file /home/operator1/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.7 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.7 debug1: compat_banner: match: OpenSSH_8.7 pat OpenSSH* compat 0x04000000 debug1: Authenticating to servera:22 as 'operator1' debug1: load_hostkeys: fopen /home/operator1/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: compression: none debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: compression: none debug1: kex: curve25519-sha256 need=32 dh_need=32 debug1: kex: curve25519-sha256 need=32 dh_need=32 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:G8DLQ9w11XotR51HOU7Y23MLhnoQvKq8luZY+5zSQb0 debug1: load_hostkeys: fopen /home/operator1/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host 'servera' is known and matches the ED25519 host key. debug1: Found key in /home/operator1/.ssh/known_hosts:1 debug1: rekey out after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 4294967296 blocks debug1: Will attempt key: /home/operator1/.ssh/id_rsa RSA SHA256:D5u5PgxlvLe7FxGndrn+6AH8jw+CCJVbJWaCBvPOd6o debug1: Will attempt key: /home/operator1/.ssh/id_dsa debug1: Will attempt key: /home/operator1/.ssh/id_ecdsa debug1: Will attempt key: /home/operator1/.ssh/id_ecdsa_sk debug1: Will attempt key: /home/operator1/.ssh/id_ed25519 debug1: Will attempt key: /home/operator1/.ssh/id_ed25519_sk debug1: Will attempt key: /home/operator1/.ssh/id_xmss debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs= debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: gssapi-with-mic debug1: No credentials were supplied, or the credentials were unavailable or inaccessible No Kerberos credentials available (default cache: KCM:) debug1: No credentials were supplied, or the credentials were unavailable or inaccessible No Kerberos credentials available (default cache: KCM:) debug1: Next authentication method: publickey debug1: Offering public key: /home/operator1/.ssh/id_rsa RSA SHA256:D5u5PgxlvLe7FxGndrn+6AH8jw+CCJVbJWaCBvPOd6o debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /home/operator1/.ssh/id_dsa debug1: Trying private key: /home/operator1/.ssh/id_ecdsa debug1: Trying private key: /home/operator1/.ssh/id_ecdsa_sk debug1: Trying private key: /home/operator1/.ssh/id_ed25519 debug1: Trying private key: /home/operator1/.ssh/id_ed25519_sk debug1: Trying private key: /home/operator1/.ssh/id_xmss debug1: Next authentication method: password operator1@servera's password: [operator1@serverb ~]$ ssh-copy-id operator1@servera /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/operator1/.ssh/id_rsa.pub" /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 operator1@servera's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'operator1@servera'" and check to make sure that only the key(s) you wanted were added. [operator1@serverb ~]$ ssh operator1@servera hostname servera.lab.example.com [operator1@serverb ~]$ ssh-keygen -f .ssh/key2 Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in .ssh/key2 Your public key has been saved in .ssh/key2.pub The key fingerprint is: SHA256:7bAGansWZPcLO6BvIBIqUBEoxKexNaOZWcwik2u3//s operator1@serverb.lab.example.com The key's randomart image is: +---[RSA 3072]----+ |o+=o | |*+.O | |o+& o | |+O . o .. | |+.. .o..S.. | |+ ....o..+. | |.. .+o ooo.. | | ..o+.o . | | .=oooE | +----[SHA256]-----+ [operator1@serverb ~]$ ssh-copy-id -i .ssh/key2.pub operator1@servera /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/key2.pub" /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 Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'operator1@servera'" and check to make sure that only the key(s) you wanted were added. [operator1@serverb ~]$ ssh -i .ssh/key2 operator1@servera hostname Enter passphrase for key '.ssh/key2': servera.lab.example.com [operator1@serverb ~]$ eval $(ssh-agent) Agent pid 1480 [operator1@serverb ~]$ ssh-add .ssh/key2 Enter passphrase for .ssh/key2: Identity added: .ssh/key2 (operator1@serverb.lab.example.com) [operator1@serverb ~]$ ssh -i .ssh/key2 operator1@servera hostname servera.lab.example.com [operator1@serverb ~]$ exit logout [student@serverb ~]$ exit logout Connection to serverb closed. [student@workstation ~]$ lab finish ssh-configure Finishing lab. · Checking lab systems ............................................... SUCCESS · Remove operator1 user .............................................. SUCCESS [student@workstation ~]$ ------ Step 11 (Second Terminal Session) $ ssh student@workstation Activate the web console with: systemctl enable --now cockpit.socket Register this system with Red Hat Insights: insights-client --register Create an account or view all your systems at https://red.ht/insights-dashboard Last login: Fri Aug 30 19:26:49 2024 from 172.25.252.254 [student@workstation ~]$ ssh student@serverb Activate the web console with: systemctl enable --now cockpit.socket Register this system with Red Hat Insights: insights-client --register Create an account or view all your systems at https://red.ht/insights-dashboard Last login: Fri Aug 30 15:35:12 2024 from 172.25.250.9 [student@serverb ~]$ su - operator1 Password: Last login: Fri Aug 30 15:35:19 EDT 2024 on pts/0 [operator1@serverb ~]$ ssh -i .ssh/key2 operator1@servera Enter passphrase for key '.ssh/key2': Register this system with Red Hat Insights: insights-client --register Create an account or view all your systems at https://red.ht/insights-dashboard [operator1@servera ~]$ exit logout Connection to servera closed. [operator1@serverb ~]$ exit logout [student@serverb ~]$ exit logout Connection to serverb closed. [student@workstation ~]$