Flashcards
Ch 6.5 Configure SSH
Cards in this deck (19)
- 1Configure SSH server file and change port number to 33sudo vim /etc/ssh/sshd_config
Port 33 - 2Configure SSH server file and allow incoming connections only from IPV4sudo vim /etc/ssh/sshd_config
Address Family inet - 3In sshd config file listen only to specific ip addressListenAddress
- 4In sshd config forbid root to login through sshPermitRootLogin no
- 5In sshd config disable password authenticationPasswordAuthentication No
- 6What is X11 forwarding?It is running graphical application on server but showin window on local computer
- 7In sshd config enable password authentication only for user mikeMatch User mike
PasswordAuthentication yes - 8Which command should we execute after change in sshd config?sudo systemctl reload sshd.service
- 9Where ssh client files are stored?/home/username/.ssh directory
- 10Create config file for ssh clientvim .ssh/config
- 11Change ssh client config so that in ssh connection you write only hostname and make this file secureHost
Hostname
Port 22
User mike
then
chmod 600 .ssh/config - 12Create private-public key pairssh-keygen
- 13What is the name of private and public key filesid_rsa and id_rsa.pub
- 14How to copy public key to server?ssh-copy-id mike@
- 15Where public keys are stored in server?in user directory
.ssh/authorized_keys - 16How can you copy public key to server if copy-id cannot be executed?Edit authorized_keys manually
vim id_rsa.pub ==> copy contents
log in server
vim authorized_keys and
paste
chmod 600 authorized_keys - 17Remove old fingerprint from filessh-keygen -R
- 18Which config files ssh client uses on connection?/etc/ssh/ssh_config
- 19What is best practice to change SSH port in client config file?sudo vim /etc/ssh/ssh_config.d/99-our-settings.conf
and change port to 229
Information
- Description
- Easy KodeKloud - Linux Flashcards on Ch 6.5 Configure SSH, created by Archimed Nemes on 27/05/2022.
- Created by
- Archimed Nemes
- Views
- 1
- Rating