Why can't I SSH into root?

Get help with installing and running AsteriskNOW.

Moderators: Moderator, Support

Why can't I SSH into root?

Postby rgmhtt » Thu Jan 11, 2007 9:25 pm

AsteriskNow beta 2:

I get an wrong password.

I have even followed the following instructions, and still could not log in with the password I set:

reboot to the cd
use "linux rescue" when prompted for boot options
chroot /mnt/sysimage

What gives? I can log in with admin the sudo su, but I want to also use gFTP so I can work with the various config files on my notebook, and move them back and forth. For this I believe I need to log in with root, as I don't see in gFTP any way to do the sudo su.

So what gives with root?
Posts: 22
Joined: Thu Dec 21, 2006 10:56 pm

Postby bkruse » Mon Jan 15, 2007 11:27 pm

sudo su -

then administer the command "passwd" to change the root password from being non-existent.

Hope this helps :]

Site Admin
Posts: 878
Joined: Mon Dec 04, 2006 3:20 pm
Location: Huntsville, Alabama

Postby rgmhtt » Tue Jan 16, 2007 4:01 am

No it doesn't.

gFTP does not provide for passing a command to the remote session.

I need to be able to log into root initially.

I think I saw an answer that from the console cli to issue a ! and then do passwd. But what userid is the console logged in as?

I am not in front of my console for now. In London UK for the IEEE 802.11 meetings..... Will try things when I get back next week.
Posts: 22
Joined: Thu Dec 21, 2006 10:56 pm

Postby leemason » Tue Jan 16, 2007 4:20 am

If you can SSH into the machine with other usernames and then su to root it could be that your sshd config is stopping root logins. Have a look in /etc/ssh/sshd_config for the line "PermitRootLogin no". If this exists comment it out and restart sshd.
Posts: 384
Joined: Fri Jan 06, 2006 8:34 am
Location: London, UK

Postby rgmhtt » Tue Jan 16, 2007 5:48 am

I turned off my machine before I left, so I can't check this out :(

I just did the ISO install, what IS the default for this?
Posts: 22
Joined: Thu Dec 21, 2006 10:56 pm

Postby j4m3s » Tue Jan 16, 2007 11:52 pm

The default is for the root account to be locked (in other words 'passwd -x root') and root via sshd disabled.

To allow for root login via ssh (highly unrecommended)
Code: Select all
$ sudo vi /etc/ssh/sshd_config

Code: Select all
PermitRootLogin No

Code: Select all
PermitRootLogin Yes

You can also just comment out the "PermitRootLogin" line as sshd's default is to allow root via ssh.
Posts: 249
Joined: Fri Dec 22, 2006 1:31 pm

Return to AsteriskNOW Support

Who is online

Users browsing this forum: No registered users and 1 guest