sshd_config

Hi,
I have SSH root disabled on Open Suse 13.1
I need to enable it but I can’t access the /etc/ssh/sshd_config
Im trying to Edit /etc/ssh/sshd_config and add the following line:

UseDNS no
What can I do?
Thank you

You only want to add one line?

Choose an editor that you are comfortable with. Maybe use “sudo” to invoke it as root. You will be asked for the root password.

For example, in a terminal window (konsole, Gnome Terminal, XFCE terminal), use:


sudo vi /etc/ssh/sshd_config

assuming that you are comfortable with “vi” as an editor. If you are not familiar with using “vi”, then better to choose something simpler. I’ve forgotten the name of the simple editor, so perhaps somebody else will comment. Or use


kdesu kwrite

to start the kwrite editor (from KDE).

Added: The simple text edit is “nano”, so you could use


sudo nano /etc/ssh/ssh_config

gamergoat89 wrote:

> I have SSH root disabled on Open Suse 13.1
> I need to enable it but I can’t access the /etc/ssh/sshd_config
> Im trying to Edit /etc/ssh/sshd_config and add the following line:
>

Don’t forget to open the appropriate port in the firewall - the default will
have the incoming port blocked by default unless you elected to open it
during installation.


Will Honea

On 2014-03-03 01:56, gamergoat89 wrote:
>
> Hi,
> I have SSH root disabled on Open Suse 13.1
> I need to enable it but I can’t access the /etc/ssh/sshd_config

Why not?

Is it a remote machine, so you don’t have direct access to it?

Do you have any ssh access to it?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Forgot my root password
anyone know How can I retrieve it on opensuse 13.1?

Google:
site:opensuse.org recover root password

https://en.opensuse.org/SDB:Recover_root_password


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

ok I fixed my root password

how do I edit the file?
kdesu kwrite opened up a text writing file but nothing happend when I wrote #UseDNS no.
and
when i tried sudo nano /etc/ssh/ssh_config command not found.

sudo vi /etc/ssh/sshd_config:E325: ATTENTION
Found a swap file by the name “/etc/ssh/.sshd_config.swp”
owned by: root dated: Mon Mar 3 18:41:27 2014
file name: /etc/ssh/sshd_config
modified: YES
user name: root host name: linux-si7w
process ID: 1620
While opening file “/etc/ssh/sshd_config”
dated: Fri Nov 8 14:20:23 2013

(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use “:recover” or “vim -r /etc/ssh/sshd_config”
to recover the changes (see “:help recovery”).
If you did this already, delete the swap file “/etc/ssh/.sshd_config.swp”
to avoid this message.

Swap file “/etc/ssh/.sshd_config.swp” already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

The “#” character at the start of that line indicates that it is a comment. You will have to remove that comment to get other than the default. And then you will need to restart the “sshd” service before the change has any effect. Rebooting is one way of restarting the service.

I restarted and it was still the same.
At this point when I open kdesu kwrite in another terminal window it wasnt the sshd_config file that I was editing

It’s hard to advise, when we are not sure what you are doing.

What’s the output from:


which sudo
which nano

And what are you trying to accomplish, with your change to sshd_config?

Is nano default installed again for a while joe was is it back to nano?? lol I believe I had to install nano in 12.3 but I used a live DVD and maybe there is a difference.

You have to be root so to start a GUI editor from the command line you need to do

kdesu kwrite. filenamehere

You can open a file owned by root but you can not save it unless you are root.

It worked!
im stuipd… I didn’t put the file path to the config file after kdesu kwrite. Thankyou gogalthrop and nrickert.
:shame:

Yeah I’m still having connection problems to mangler when connecting to a server.
Although I changed UseDNS “yes” to "no in sshd_config file
The connection won’t go through sometimes and I think its because of my firewall.

I don’t know.

I seem to have both, but I did not explicitly install either. But perhaps one comes with the system and the other with the base-devel pattern.

On 2014-03-04 04:06, gogalthorp wrote:
> Is nano default installed again for a while joe was is it back to nano??

Nope.

joe is installed by default. The rescue images also contain joe,
although not the symlinks like jstar. We asked many times the
devs/packagers to add it, for ages, considering that asking newcomers to
use “vi” for emergencies was going to send them back to Windows running >:-)

I don’t remember ever seeing nano installed by default, though. :-?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)