Reputation: 688
I have to set up ssh connection to VM on Google Cloud Platform that won't requiere any keys, just username and password. Is that possible?
Upvotes: 3
Views: 1884
Reputation: 156
To enable SSH password authentication on Compute Engine instances, you must edit the sshd_config file, to do that first go to your instance by clicking on the “SSH” button next to the instance name on Cloud Console.
Then a terminal appears and you should be able to edit the config file using: sudo nano /etc/ssh/sshd_config
Then, change the line: PasswordAuthentication no
to PasswordAuthentication yes
Also, if you need to have directly root ssh access with username/password authentication, also change the line: PermitRootLogin no
to PermitRootLogin yes
After making that changes, restart the SSH service by running the following command:
1.- If your OS is Ubuntu/Debian: sudo service ssh restart
2.- If your OS is CentOS/RedHat: sudo service sshd restart
Now you should be able to login with username/password authentication.
Upvotes: 5