SSH Flashcards

1
Q

Dir contains pub and private keys on local machine

A

~/.ssh

After connecting using ssh, remote host’s finger print will be added to ~/.ssh/known_host file of local machine

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

Generate pub/priv pair of keys on local machine

A

ssh-keygen -t dsa

default encryption is rsa: ssh-keygen -t rsa= ssh-keygen

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

File contains authorized keys on remote machine

A

~/.ssh/authorized_keys

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

Global client side conf file of ssh

A

/etc/ssh/ssh_config

here port to connect to ssh server can be set up

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

Global server side conf file of ssh

A

/etc/sshd_config
1. 22 port be redefined to accept connections from
2. Root user can be restricted to access to
3. add AllowUsers user1
add AllowGroups
to allow only specified users and/or groups to

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

TCPWrappers

A
create hosts.allow and/or hosts deny in /etc dir
vim /etc/hosts.allow
sshd : 1.2.3.4, 1.2.3.5
vim /etc/hosts.deny
sshd : ALL
hosts.allow supersedes hosts.deny
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Add to cache passphrase for current ssh session

A

ssh user@server
ssh-agent bash
ssh-add
so for this session, there will be no need to enter a passphrase again:
ssh user@server cd .ssh; ls -la=>
remote server will not ask for passphrase

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