local server run commands ssh code example
Example 1: bash how to log in to remote server
# Basic syntax:
ssh username@ip_or_host_address
password
Example 2: use file connect ssh
sudo chmod 400 [key file]
sudo ssh -i [key file] [username]@[ip]
# Basic syntax:
ssh username@ip_or_host_address
password
sudo chmod 400 [key file]
sudo ssh -i [key file] [username]@[ip]