apt-get install openssh-server --- Server Side
apt-get install openssh-client --- Cleint Side
service ssh start -- Server side
ssh [email protected] --- Cleint side
ssh [email protected] --- Client side
Disabling root login on ssh
$nano /etc/ssh/sshd_config
>Search "PermitRootLogin yes"
>Change "PermitRootLogin No"
$service ssh restart
Note: So now if anyone want to login as root he has to login as user account first then use su
command to login to user account if he is added to sudoers file
Download the key
chmod 400 key.pem
ssh -i [email protected]
$sftp -i key.pem [email protected]
$ls --> list files on remote host
$lls --> list files on local host
$put local_file.txt --> Upload my local_file on remote server
$get remote_file.txt --> Download remote_file.txt to local machine