SSH Flashcards
Dir contains pub and private keys on local machine
~/.ssh
After connecting using ssh, remote host’s finger print will be added to ~/.ssh/known_host file of local machine
Generate pub/priv pair of keys on local machine
ssh-keygen -t dsa
default encryption is rsa: ssh-keygen -t rsa= ssh-keygen
File contains authorized keys on remote machine
~/.ssh/authorized_keys
Global client side conf file of ssh
/etc/ssh/ssh_config
here port to connect to ssh server can be set up
Global server side conf file of ssh
/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
TCPWrappers
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
Add to cache passphrase for current ssh session
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