LinuxQuestions.org
Help answer threads with 0 replies.
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 12-09-2009, 10:08 AM   #1
amirsd
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
enable SSH without console access


I am unable to ssh to one of the Linux box. Need to un-comment the line "#PermitRootLogon = yes" in the file "/etc/ssh/sshd_config" and then restart the ssh. The issue is that I do not have access to the console but I do have root access to the machine.

Is there any other way I can access this file other then ssh since its disable and un-comment the line above. Any tips would be nice.
 
Old 12-09-2009, 10:16 AM   #2
SethsdadtheLinuxer
Member
 
Registered: Jun 2007
Posts: 152

Rep: Reputation: 37
ftp would be a way to get the file, modify it and put it back, but that wouldn't restart the service.
 
Old 12-09-2009, 10:48 AM   #3
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Blog Entries: 1

Rep: Reputation: 55
also,

if you have root access it is possible to go to the directory through nautilus konqueror or whatever you have, and then edit the file with emacs, vi...

then restar the service through the gui.

which linux distribution are you using?

...and, cannot you run any terminal from the root gui?
 
Old 12-09-2009, 06:12 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,425

Rep: Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786
When you say you have root access, how do you login to the box; telnet, local keybd?

Permitting root access for ssh is a huge security hole and against best practice. Please do not do that.
Setup a non-root user and then him him access via su or sudo.

Last edited by chrism01; 12-09-2009 at 06:14 PM.
 
Old 12-10-2009, 01:33 AM   #5
centos82
Member
 
Registered: Sep 2008
Distribution: CentOS
Posts: 75

Rep: Reputation: 16
IF you have SSH access to the box. Once there you can su - root then modify the file.
 
  


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
SSH access problems: Can only allow users SSH access by adding to root group dhupke Slackware 10 12-21-2008 10:48 AM
BusyBox - Serial Console Disable/Enable serdark Linux - Embedded & Single-board computer 2 01-17-2008 06:36 AM
How to enable console_print() to print to console? pat_and_cami Programming 1 04-18-2006 12:17 AM
Kernel 2.6.6, how to enable the other console resolutions? jml75 Slackware 1 06-13-2004 12:25 PM
Kernel 2.6.6, how to enable the other console resolutions? jml75 Linux - Networking 1 06-13-2004 12:23 PM

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

All times are GMT -5. The time now is 11:27 PM.

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