Raveen Kumar

ssh

Cd to a particular dir after ssh

$ ssh -t ostechnix@192.168.225.52 'cd /home/ostechnix/dir1 ; bash'

To automatically install a ssh public key on a remote machine

ssh-copy-id -i ~/.ssh/id_rsa.pub $USER@$HOSTNAME

To manually install a ssh public key on a remote machine

cat ~/.ssh/id_rsa.pub; # copy the contents of the file; paste into ssh/authorized_keys file;
chmod 600 ~/.ssh/authorized_keys

#Ssh #Linux #Command-Line #Notes