Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

SSH login issue

Solved Go to solution

SSH login issue

New Contributor

I am running the sandbox on Azure. I am able to login to Ambari, hue and 8080 page. However, the SSH using putty or using web version at port 4200, does not accept any credentials.

Tried root/hadoop Also the user name and password set for this vm at azure. Getting Access denied message. Thoughts? How do reset root password if it helps?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: SSH login issue

New Contributor

Thanks to everyone for the suggestions. I wanted to give an update as I am able to connect to the prompt, hopefully will help others who have similar environments similar to mine.

My challenge was to get the SSH working from Windows 10 (Surface Pro) where the VM was created in Azure (classic)

General guidelines https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-use-ssh-key/

  • Installed GitHub with GitShell.
  • Ran the command from GitShell to generate the key file and .pem file (openssl.exe req -x509 -nodes -days 365 -newkey rsa:2048 -keyout myPrivateKey.key -out myCert.pem)
  • Installed PuttyGen
  • Convert to .rsa file so PuttyGen can understand (openssl rsa -in ./myPrivateKey.key -out myPrivateKey_rsa# chmod 600 ./myPrivateKey_rsa)
  • Load the private key via PuttyGen, save the PrivateKey as .ppk file
  • Next copy the PublicKey from PuttyGen.

Now, I attempted to take the key to existing Azure VM, Settings, Reset Password and change to SSH Public Key. Although, the key was accepted, it did not finish for a long time. The restart did not help. Kept getting Server key was refused.

  • So, I created a new VM using Marketplace Sandbox using Resource Manager (not classic) using the Public Key. Note down the user name!
  • Ran Putty, provided the IP address using port 22, on SSH -> Auth page, provided the .ppk file saved earlier from PuttyGen.
  • When prompted, provide the username used in Azure portal. Voila!
10 REPLIES 10

Re: SSH login issue

@ergo al2011

https://hortonworks.com/hadoop-tutorial/deploying-...

NOTE: Make sure to write down your username and password. If using ssh public key, ensure you have the corresponding private key. Without it, you won’t be able to access the terminal of the machine.

Re: SSH login issue

Re: SSH login issue

Mentor

Log on as root on your sandbox and follow the below procedure

Just press "Enter" when prompted for a passphrase.

[root@hadoop01 ~]# ssh-keygen

Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):

/root/.ssh/id_rsa already exists. Overwrite (y/n)? y

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is: 6f:40:61:c1:89:a5:f0:f4:8d:6b:01:98:fc:01:fb:d4 root@hadoop01

The key's randomart image is:

Two files will be created in the folder /root/.ssh [

root@hadoop01 ~]# cd /root/.ssh id_rsa id_rsa.pub

Copy the contents of id_rsa.pub to authorized_keys and copy this files to your desktop

Execute the below commands

[hdp@hadoop01 .ssh]$ cat id_rsa.pub >> authorized_keys

copy this authorized_keys to your local desktop/laptop c:\drive or wherever.

Then on your putty under connection>>Ssh>>auth browse and locate the downloaded authoriszed_keys on your computer and import it into putty remember to chose the good algorithm either ssh-1 or ssh-2 RSA

Now you can log on without any issues.

Please let me know if you are succesfully and accept the answer

Re: SSH login issue

Mentor

@ergo al2011 Did you import the generated id_rsa.pub that you copied to authorized_keys? Can you tell me precisely where you failed what step?

Re: SSH login issue

New Contributor

My problem is that I am running Windows and I cannot connect to terminal mode of the sandbox to run any commands recommended here. I think I have to generate the keys and plug it in Azure, which I assume copies to authorized keys. Still on this step.

Re: SSH login issue

New Contributor

@

Geoffrey Shelton Okot

I cannot successfully login as root. The enter does not give me a prompt to enter commands. Sample below.

login as: root

root@xxxxx. cloudapp . net 's password:

Access denied

root@xxxxx . cloudapp . net's password:

Are there specific settings in Putty? I am using machinename.cloudapp.net with port 22, which is same as SSH port in the endpoint at azure. OS on my side is W10.

Re: SSH login issue

Master Collaborator

You likely need a keypair file to be passed.

ssh -i <keypair> root@xxxxx.cloudapp.net

Re: SSH login issue

Mentor

Try this 2 methods they should help

https://goo.gl/g8kkh8

http://goo.gl/tJOLlh

Re: SSH login issue

Mentor

Try this 2 methods they should help

https://goo.gl/g8kkh8

http://goo.gl/tJOLlh

Don't have an account?
Coming from Hortonworks? Activate your account here