LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-18-2007, 05:55 PM   #1
bourne
Member
 
Registered: Feb 2006
Location: Toronto, Ontario
Distribution: Fedora 10, centos
Posts: 181

Rep: Reputation: 30
Cannot edit files pertaining to SSH security


Hey guys whats up
I recently installed openSSH on my ubuntu box at home. I wanted to be able to access my machine at home and transfer files back and forth between it and my laptop and my schools server.

Since I installed it I have been attempting to make it as secure as I can but for the life of me I haven't been able to get anything to work. The main root of the problem is that I am unable to get into edit the "/etc/ssh/sshd_config" file.
When I issue the command:
Code:
sudo vim /etc/ssh/sshd_config
Nothing happens, the file doesn't open or anything

when I issue the command:
Code:
vim /etc/ssh/sshd_config
The file opens but I am unable to make any permanent changes to the file. This is a problem because some of the security measures I am trying to employ require me to get in and edit this file.
I have noticed that I am also unable to edit the "/etc/hosts.allow" and the "/etc/hosts.deny" files. The same exact things happens.
Does anyone know why I am unable to modify these files, even as root? I have checked permissions on the file and I should have access to modify them using the sudo command, but it just isn't happening.

I am using ubuntu Fiesty 7.04

Any suggestions would greatly be appreciated
thanks in advance
todd

Last edited by bourne; 11-18-2007 at 06:00 PM.
 
Old 11-19-2007, 02:38 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by bourne View Post
When I issue the command:
Code:
sudo vim /etc/ssh/sshd_config
Nothing happens, the file doesn't open or anything
That command looks right to me. I just tried it on edgy eft and had no problem. (I didn't try to change anything, but the editor opened w/o any warnings -- such as readonly -- and text displayed.)

Quote:
Any suggestions would greatly be appreciated
Well, if the way you are supposed to do it fails, you could always try being sneaky, actually becoming root, and then try editing it:

Code:
user@box:~$  sudo su
root@box:user# vim /etc/ssh/sshd_config
 
Old 11-19-2007, 07:28 PM   #3
bourne
Member
 
Registered: Feb 2006
Location: Toronto, Ontario
Distribution: Fedora 10, centos
Posts: 181

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by blackhole54 View Post
That command looks right to me. I just tried it on edgy eft and had no problem. (I didn't try to change anything, but the editor opened w/o any warnings -- such as readonly -- and text displayed.)

Well, if the way you are supposed to do it fails, you could always try being sneaky, actually becoming root, and then try editing it:

Code:
user@box:~$  sudo su
root@box:user# vim /etc/ssh/sshd_config
Yeah man I ended up figuring out what it was. I totally removed myself from the sudo group lol. I can't believe I didn't see it before. I really appreciate that help man

todd
 
Old 11-19-2007, 09:23 PM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by bourne View Post
I totally removed myself from the sudo group lol.
I would have expected sudo to give you an error telling you that you aren't permitted to do that. Anyway, I'm glad you got it figured out.
 
  


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
Prob pertaining to eth0 vroom Linux - Networking 3 05-09-2006 07:27 AM
GUI to queue and edit jobs to be done over ssh Samsara Linux - Software 1 01-25-2006 04:40 AM
Message pertaining to Java saxophobe Linux - Newbie 1 10-12-2003 08:20 PM
How Do I Edit Files in SSH/Telnet? John_Saunders Linux - Newbie 5 06-15-2002 11:08 AM


All times are GMT -5. The time now is 07:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration