LinuxQuestions.org
Visit Jeremy's Blog.
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, 09: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, 10:00 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

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, 10:02 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

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, 10:30 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
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, 10:42 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,101

Rep: Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552
Many distro's force you to ssh as a standard user. After connected then you can sudo.
 
Old 08-21-2014, 10: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 10:54 PM.
 
Old 08-21-2014, 10:54 PM   #7
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,666

Rep: Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543Reputation: 1543
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:53 PM
Opensuse13.1 wireless not working after installaion yaarappa Linux - Software 10 01-25-2014 06:23 AM
ssh, unable to connect to a machine, with any account, other than root WetFroggy Slackware 11 02-02-2012 02:55 AM
[SOLVED] Unable to login as root through SSH satya123 Linux - Newbie 24 04-14-2011 01:54 AM
Unable to us SU to root when logged in via SSH CaptainReboot Linux - Server 5 12-29-2007 06:36 AM

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

All times are GMT -5. The time now is 01:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration