Chapter-9 : Configuring and Securing OpenSSH Service

 

Chapter 9

Configuring and Securing OpenSSH Service 


Questions:

1. The OpenSSH Secure Shell, ssh is used to securely run a shell on a remote system

                a. True b. False 


2. Create a remote interactive shell as the current user

                a. ssh remotehost       b.  ssh root@remotehost           c.  ssh  -l   remotehost


3. Connect to a remote shell as a different user (remoteuser) on a selected host (remotehost):

                a. ssh  remotehost     

                b.  ssh  root@remotehost    

                c.  ssh  -l   remoteuse@remotehost    

                d. ssh   remoteuser@remotehost


4. Execute a single command (hostname) on a remote host (remotehost) and as a remote user (remoteuser) in a way that returns the output to the local display:

                a. ssh  remoteuser@remotehost   hostname

                b. ssh  -l   remoteuser@remotehost   hostname

                c. ssh  remoteuser@remotehost  -l   hostname

                d. ssh  remoteuser.remotehost   hostname


5. The -----  command displays a list of users currently logged into the computer.

                a. top b. ps c. w d. w –f


6. the ssh command stores the server's public key in the user's ----   file

                a. ~/.ssh/known_hosts

                b. /etc/.ssh/known_hosts

                c. /etc/ssh/sshd_config

                d. ~/.ssh/sshd_config

                e. /etc/ssh/ssh_host_key*


7. Host keys are stored in -----------  on the SSH server

                a. ~/.ssh/known_hosts

                b. /etc/.ssh/known_hosts

                c. /etc/ssh/sshd_config

                d. ~/.ssh/sshd_config

                e. /etc/ssh/ssh_host_key*


8. Users can authenticate ssh logins without a password by using ---

                a. private key authentication

                b. public key authentication

                c. manual authentication

                d. public & private  key scheme


9. ssh allows users to authenticate using a private-public key scheme.

                a. True b. False


10. Key generation is done using the --------- command

                a. ssh-keygen

                b. sshkeygen

                c. sshd-keygen

                d. ssh   -keygen    


11. After generating key pair, keys are store in 

                a. Private Key =  ~/.ssh/id_rsa.pub       ;          Public Key =   ~/.ssh/id_rsa    

                b. Private Key =  ~/.ssh/id_rsa              ;          Public Key =   ~/.ssh/id_rsa.pub       

                c. Private Key =  ~/ssh/id_rsa.pub        ;          Public Key =   ~/ssh/id_rsa       

                d. Private Key =  /etc/.ssh/id_rsa.pub   ;          Public Key =   /etc/.ssh/id_rsa       

                e. Private Key =  /etc/.ssh/id_rsa          ;          Public Key =   /etc/.ssh/id_rsa.pub      


12. During key generation, there is the option to specify a passphrase which must be provided in order to access your 

                a. private key b. public key


13. the passphrase must be entered whenever the key is used, making the authentication process no longer password-less. This can be avoided using 

                a. ssh-agent b. ssh-add c. ssh-config d. sshd-config


14. Before key-based authentication can be used, the public key needs to be copied to the destination system. This can be done with -------.

                a. sshd-copy-id

                b. ssh-copy-id

                c. ssh-copy-key

                d. sshd-copy-key


15. When the key is copied to another system using ssh - copy - id, it copies the --  file by default.

                a. ~/.ssh/id_rsa.pub

                b. ~/.ssh/id_rsa

                c. /etc/sshd/known_host

                d. /etc/.ssh/id_rsa.pub


16. To  copy the public key to the correct location on a remote system(server.abc.local)

                a. ssh-copy-id        -i     ~/.ssh/id_rsa.pub     root@serverX.abc.local

                b. ssh-copy-id     ~/.ssh/id_rsa.pub     root@serverX.abc.local

                c. ssh-copy-id        -R     ~/.ssh/id_rsa.pub     root@serverX.abc.local


17. To  copy the public key of user ‘mushfiq’ to the correct location on a remote system(server.abc.local)

                a. ssh-copy-id        -i     /home/.ssh/id_rsa.pub     root@serverX.abc.local

                b. ssh-copy-id     /home/mushfiq/.ssh/id_rsa.pub     root@serverX.abc.local

                c. ssh-copy-id        -i     /home/mushfiq/.ssh/id_rsa.pub     root@serverX.abc.local


18. The OpenSSH server has an internal configuration file setting to prohibit a system login as user root. which is commented out by default in the ----------- file:

                a. /etc/ssh/ssh_config

                b. /etc/sshd/sshd_config

                c. /etc/sshd/ssh_config

                d. /etc/ssh/sshd_config


19. the root user will be unable to log into the system using the ssh command by which edited?

                a. PermitRootLogin yes

                b. PermitRootLogin no

                c. PermitRootLogin without-password

                d. PermitRootLogin with-password

                e. PasswordAuthentication no

                f. PasswordAuthentication yes


20. To allow only key-based ssh login as root with

                a. PermitRootLogin yes

                b. PermitRootLogin no

                c. PermitRootLogin without-password

                d. PermitRootLogin with-password

                e. PasswordAuthentication no

                f. PasswordAuthentication yes


21. To protect password based authentication, 

                a. PermitRootLogin yes

                b. PermitRootLogin no

                c. PermitRootLogin without-password

                d. PermitRootLogin with-password

                e. PasswordAuthentication no

                f. PasswordAuthentication yes


22. To restart the ssh service ---

                a. systemctl  restart   ssh

                b. systemctl  restart   sshd

                c. systemctl  reload   ssh

                d. systemctl  reload   sshd


23. The port number of  ssh

                a. 21 b. 22 c. 23 d. 20


Comments

  1. Red Prism Group ins one of the best Django coaching in Noida. Learn Django from industry expert with practical training, live projects and got your certificate.

    ReplyDelete

Post a Comment

Popular posts from this blog

Some Questions for MTCNA Exam

ডিপ্লোমা লেভেল এর ইন্ডাস্ট্রিয়াল এটাচমেন্ট এ আসার পূর্বে একটু ভেবে আসার অনুরোধ রইলো

Basic Router & Switch IOS commands