Google Compute Engine not acceping password set - ubuntu-14.04

I am using google compute engine to create a VM instance. When I login using SSH or gcloud, it asks me to set a password. When I try to login using that password, it says authentication not successful and terminates. I have looked all around the internet but couldn't find the solution. I have tried this numerous times now but still the same result. Is anyone else facing this problem? Does anyone has a solution for this?
I am using Ubuntu 14.04 LTS instance.

ssh login to you instance through google cloud console
sudo nano /etc/ssh/sshd_config
there is a configuration called
PasswordAuthentication no
change to
PasswordAuthentication yes
restarat ssh service

Related

What means terminal prompts disabled?

I use gitlab since some years.
After an update of my mac book, one application fails on deploy with deployer.
fatal: could not read Username for 'http://mygitlab.org:22': terminal prompts disabled
I use the same gitlab server for all projects. The other projects are working well.
I compared the gig config file. No differences between the applications.
I tried to set/change the username. No success
I created a new repo on gitlab, and cloned it into my php storm. No success
Has someone an idea, where i have to search?
Thanks in advance!
Check the URL of that repository. A port 22 is the default one used by SSH, so seeing an HTTP URL used is strange, and would trigger a prompt for the username.
This differs from a git#mygitlab.org: URL (or ssh://git#mygitlab.org:22/...), which should not need any prompt, if the right SSH key is used (and has no passphrase, or if the passphrase is cached in an ssh-agent).

Messed up bash.bashrc file, can not access Azure VM using SSH anymore

I was doing some changes in the bashrc file. After trying to reload the file again I was logged out of the SSH session and now I am not able to access it anymore. I tried to restart the VM but ofc this did not solve my issue. Since I am new to Azure cloud any help will be much appreciated!
You can try VM Serial Console to get into your VM.
https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/serial-console-overview

azure-lab-services permission denied when connected with default credentials

I'm previewing Azure Labs (managed) which is in preview at this moment. I've followed a tutorial from Microsoft on how to get started.
I've created a classroom lab with 3 virtual machines, based of a default Ubuntu image from the Marketplace. I've copied/pasted the default credentials of that template which is used for all virtual machines in that classroom lab.
Then I published it, added a user, got a registration link and used that to register as that user (a so called student). I can see the VM I expected to see. I can start it, wait some 30 seconds and then I can click on the connect button to get the ssh connection details. I open terminal, paste the ssh connection details and I get a password challenge. Excellent! So far it all works as expected. But when I enter the password I copied from the default template, permission is denied. So I try again, denied. So I wait a minute (maybe the VM needs some more time to fully boot up), but permission denied.
The tutorial looks very easy to me, I choose a default Ubuntu 18.04 LTS image to be used. I even tried to create a new classroom lab, but during creation of that template, I choose to start it, connect to it and install additional software before publishing it. That worked (as I expected). But when I publish that classroom lab, register a student account and try to login to a VM in that classroom with the correct default credentials I used to install additional software, I too get permission denied.
I'm confused.
Anyone?
Thanks to D43m0n for the feedback from Microsoft. I have been having the same issue but on CentOS images.
It appears the provisioning of the student machines after the template is published locks the default user account. Creating a new user is not such a great workaround because students will have to change the SSH or RDP settings to connect. The issue also affects more than just Ubuntu. I am seeing it on the newer version of CentOS (7.8 and greater it looks like). I think it is for any images that use cloudinit for the provisioning of the student machines. The older CentOS images use WALinuxAgent and don't seem to have this issue.
I have worked around it unlocking the default user account in /etc/rc.d/rc.local so that is executed on boot. The rc file differs on other systems so check what it is for your flavour of linux.
usermod -U default_username
This has fixed the issue for me until Microsoft fix their provisioning.
thanks for posting! Were you able to connect to the template machine (Ubuntu) and then you weren't able to connect to the student machine (Ubuntu)? Could you copy the exact error message you're seeing?
We are aware of an issue with Ubuntu images--when you connect, the VM tells you to reset the password but doesn't provide a way to do so. We're working on a feature that will resolve this issue.
Is this what you're seeing?
You can use other flavors of Linux fine.
Let us know!
In the template-vm create a new user:
sudo adduser newuser #follow the agent
sudo usermod -aG sudo newuser
after that you can start your course vm's an login with that user.

No sudo permissions on google CentOS VM

It is suposed that every user in the VM created on the Google Cloud Platform has root permissions, but I haven't been able to do anything, because it says that my user has no permissions and I don't have any password, either for my user, or for root.
Is there any default password for root, or any way I could find it?
Thanks!
well i have virtual machine with ubuntu (i presume that it is the same for other linux distros as well) : login to your Google Cloud platform -> VM Instances -> click on you instance (virtual machine) , click on SSH button which is on left upper corner and for example pick a frist option Open in browser window.. when the windows opens you will be logged in as regular user with sudo permission. After that you can create users etc.. If you want to use other ssh client then go to
https://cloud.google.com/compute/docs/instances/connecting-to-instance#standardssh
it well written documentation.. the most "complicated" will be to create key pairs .. if you still have problems just ask :)

Default Jenkins User Password

I have a fresh install of Jenkins as a service on my Linux machine. When Jenkins installs, it creates a 'jenkins' user, but I can't seem to find the default password for it anywhere.
I'm trying to secure my system, so if the default password is '123' or something insecure that I just haven't thought of yet, that's a problem.
Thanks!
I don't believe it has any password. You should be able to do:
sudo passwd jenkins
This will prompt for you to set a password.
Alternatively you could create the jenkins user prior to installing, and it would leverage that one.
For fedora,
Go to /root/.jenkins/
open config.xml
In config.xml, set disableSignup to false.
Restart Jenkins.
Go to the Jenkins web page and sign up with a new user.
In config.xml, duplicate one of the hudson.model.Hudson.Administer:username lines and replace username with the new user.
If it's a private server, set disableSignup back to true in config.xml.
Restart Jenkins.
Go to the Jenkins web page and log in as the new user.
Reset the password of the original user.
Log in as the original user.
Default password for user jenkins is just "jenkins". However, logging into this user automatically closes your session (probably it is set to be used only to allow using particular computer as a jenkins agent, but I'm not sure). That't why su - jenkins and typing jenkins do not work.
You can try logging as a jenkins user with ssh and you will see that it works, but suddenly the session is closed:
I believe there is a solution for this, but maybe it is not needed in your case. Really need to use system as a jenkins user? Doubt it.
C:\Windows\system32\config\systemprofile.jenkins\secrets\
goto above mentioned path and find
"initialAdminPassword" click that file and copy value
this is password for jenkins!

Resources