Understanding Remote Administration with OpenSSH Flashcards

1
Q

telnet is susceptible to …

A

sniffing as it offers no encryption or modern security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What replaced telnet?

A

SSH v2 replaced it, it uses port 22

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What else does ssh replace?

A

SSH also replaces rcp, rlogin, rsh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is ssh based on?

A

SSH is based on public/private key encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are some ssh features?

A

1) remote login
2) drop in commands: ssh remote_user@ ‘command in remote ip>
3) remote multi-system copying with scp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the ssh dynamics for logging into a system?

A

1 client starts a connection via ssh port 22
2 server replies with Host Public key
3 client stores public key in ~/.ssh/known_hosts
4 Diffie-Hellman session key is agreed upon
5 Client authentication is accomplished
6 A secure and encrypted session is established

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what replaces rcp?

A

scp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what replaces rsh?

A

ssh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what replaces ftp?

A

sftp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are 2 common sftp commands to copy files to and from a remote system?

A

get file_to-copy /home/cloud_user
copies the file from the sftp to /home/cloud_user
————-
put -r bin/
places from the local system to the sftp in the current location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does this do?

ssh-copy-id .ssh/rsa_id.pub @

A

this copies the file to the authorized_keys file, alternatively, you can copy/paste the public key to the authorized_keys file in the target machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What file is used for ssh clients config?

A

for ssh clients, see /etc/ssh/ssh_config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Where is the local user config for ssh client?

A

~/.ssh/config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the default option for SSH connectivity when it connects to the first time?

A

The default option for SSH connectivity is to ask, that is why when you first connect to a server, it says:

The authenticity of host can;t be established.
ECDSA ley fingerprint is
Are you sure you want to continue connecting (yes/no)?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the options in the ~/.ssh/config file?

A

ask > default option, ask to store the key if not already known
yes > will only connect if key is pre-shared (secure)
no > stores the key automatically (security risk!)
accept-new > auto add keys, won’t connect to changed keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Where is the system config saved for ssh servers?

A

system config is at /etc/ssh/sshd_config > this is the daemon, not for the clients

17
Q

What should you do after changing the file /etc/ssh/sshd_config?

A

you should restart the sshd service

18
Q

What are some options in the /etc/ssh/sshd_config?

A
Protocol > v2 is the default
AllowUsers > Deny all BUT these users
DenyUsers >  Allow all BUt these users
port > specify ssh port (can be several)
UsePAM
19
Q

the steps for key-based authentication are:

A

1 generate the key pair (ssh-keygen)
2 upload the public key to the remote server (ssh-copy-id)
3 verify the public key works
4 add your credentials to the ssh-agent
5 connect without password to the remote server