UNIX-1.12 SSH Command


Make sure to subscribe to my channel for more videos on UNIX, Perl and SQL.
facebook: facebook.com/fuzicast
twitter: @fuzicast
youtube: youtube.com/fuzicast

ssh username@host – remote login to a remote host
ssh -i ssh-key username@hostname – using another key to ssh remote host
ssh-keygen -t rsa/dsa – generate ssh keys using either rsa or dsa encryption
sudo useradd -m username – create user with home directory created automatically
passwd username – change password for that user
sudo usermod username -s /bin/bash – set type of shell for user
~/.ssh/config – create this config file and add Host, User, Hostname and IdentityFile settings
Host alias_name
Hostname localhost
IdentityFile ~/.ssh/obama.key
User username
ssh-copy-id username@hostname – copy ssh public automatically to remote host
ssh username@hostname ‘remote-command’ – execute remote commands
ssh -F another_config_file username@hostname – specify different config file
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no username@hostname – do not check for known hosts and add host key automatically to known_hosts file. since we set known_host file to /dev/null, new host key will be added to garbage file.