LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2014, 08:55 PM   #1
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Rep: Reputation: Disabled
opensuse13.1 unable to ssh in as root after reboot


Hi all

Disclaimer: I do know why allowing ssh as root is bad idea. Thank you. This is just something weird that I noticed.

I noticed something weird with my opensuse 13.1 VM. I would set /etc/ssh/sshd_config's PermitRootLogin to yes, restart sshd, and I can ssh in as root.

But once I reboot the VM, I can no longer ssh in as root. I have to go to the console, restart sshd again, and then I can ssh in as root. Can someone explain to me why that is?

Thanks
 
Old 08-21-2014, 09:00 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Have you checked to see if you can ssh as normal user?
If not you'll have to set it to run on startup.
 
Old 08-21-2014, 09:02 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
http://forums.opensuse.org/showthrea...arting-on-boot
 
1 members found this post helpful.
Old 08-21-2014, 09:30 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
That is odd, and I don't have a good answer for you...it almost sounds like your /etc/ssh/sshd_config isn't being read correctly on boot. I'm assuming since this is a VM that you just have a single partition for "/"...do you have a more complicated partition setup? Are you seeing any errors in /var/log/messages? Do you have any errors ssh'ing into normal user accounts after a reboot, before you restart sshd?
 
Old 08-21-2014, 09:42 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Many distro's force you to ssh as a standard user. After connected then you can sudo.
 
Old 08-21-2014, 09:53 PM   #6
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Original Poster
Rep: Reputation: Disabled
Hi all

The link Eddy posted was right:
http://forums.opensuse.org/showthrea...arting-on-boot

TL;DR version:
sshd is not set to run at start up. Once I enabled sshd in System Services it worked.

thanks

Last edited by jzoudavy; 08-21-2014 at 09:54 PM.
 
Old 08-21-2014, 09:54 PM   #7
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Perhaps a listening process is being maintained on the host machine.
After rebooting the VM, check for a stale listening process on the host with 'ps ax | grep ssh". If there is a stale process, kill it, then try the ssh to the VM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I upgrade from opensuse13.1 - opensuse develope? Shadowmeph SUSE / openSUSE 2 01-31-2014 12:53 PM
Opensuse13.1 wireless not working after installaion yaarappa Linux - Software 10 01-25-2014 05:23 AM
ssh, unable to connect to a machine, with any account, other than root WetFroggy Slackware 11 02-02-2012 01:55 AM
[SOLVED] Unable to login as root through SSH satya123 Linux - Newbie 24 04-14-2011 12:54 AM
Unable to us SU to root when logged in via SSH CaptainReboot Linux - Server 5 12-29-2007 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration