LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cannot edit files pertaining to SSH security (https://www.linuxquestions.org/questions/linux-server-73/cannot-edit-files-pertaining-to-ssh-security-600683/)

bourne 11-18-2007 05:55 PM

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

blackhole54 11-19-2007 02:38 AM

Quote:

Originally Posted by bourne (Post 2963471)
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


bourne 11-19-2007 07:28 PM

Quote:

Originally Posted by blackhole54 (Post 2963794)
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

blackhole54 11-19-2007 09:23 PM

Quote:

Originally Posted by bourne (Post 2964735)
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.


All times are GMT -5. The time now is 03:12 AM.