SHELL, problem to connect via SSH

hi,
strangely today I can't connect to ssh after several tries and reboot my machine...
I do it exactly the same way than I used to do in the past
Another ticket is opened because I have strange issues on some websites... I don't know if it's related
I also tried setting with IP instead of server name and it didnt work...

:( I hope you're not going to tell me that it's working for you like some other current issues because I really feel helpless
something's bad has been going on for me the pas 3 days and it's probably related somehow...

Please help and sorry to use so much of support energy this week... but my VPS is really going wild :(

Kindly
    Posted On: 28 May 2008 04:42 AM
pic1

Attachments  putty.jpg (30.35 KB)
    Posted On: 28 May 2008 04:42 AM
pic2

Attachments  putty2.jpg (17.25 KB)
    Posted On: 28 May 2008 04:50 AM
Hello Matthieu,

It seems your sshd server was down, I've started it again.


Let us know if you experience further troubles.


Best regards,
    Posted On: 29 May 2008 07:42 AM
Hi,
sorry,
I can't connect ssh again,
I went and restarted ssh server and it didnt work

also it was showing:

Attempting to restart sshd
Waiting for sshd to restart.... . . . . . . . . . . finished.

sshd status




May 29 07:39:36 server sshd: Stopping sshd failed May 29 07:39:36 server sshd: May 29 07:39:36 server sshd: failed sshd has failed, please contact the sysadmin.

Can you help please?
Thanks
    Posted On: 29 May 2008 08:16 AM
Hi

the problem was the permissions on couple of files.

This is transcript from your server's logs:

May 29 07:22:18 server sshd[13824]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 29 07:22:18 server sshd[13824]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
May 29 07:22:18 server sshd[13824]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 29 07:22:18 server sshd[13824]: error: Permissions 0755 for '/etc/ssh/ssh_host_key' are too open.
May 29 07:22:18 server sshd[13824]: error: It is recommended that your private key files are NOT accessible by others.
May 29 07:22:18 server sshd[13824]: error: This private key will be ignored.
May 29 07:22:18 server sshd[13824]: error: bad permissions: ignore key: /etc/ssh/ssh_host_key
May 29 07:22:18 server sshd[13824]: error: Could not load host key: /etc/ssh/ssh_host_key
May 29 07:22:18 server sshd[13824]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 29 07:22:18 server sshd[13824]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
May 29 07:22:18 server sshd[13824]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 29 07:22:18 server sshd[13824]: error: Permissions 0755 for '/etc/ssh/ssh_host_rsa_key' are too open.
May 29 07:22:18 server sshd[13824]: error: It is recommended that your private key files are NOT accessible by others.
May 29 07:22:18 server sshd[13824]: error: This private key will be ignored.
May 29 07:22:18 server sshd[13824]: error: bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key
May 29 07:22:18 server sshd[13824]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
May 29 07:22:18 server sshd[13824]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 29 07:22:18 server sshd[13824]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
May 29 07:22:18 server sshd[13824]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
May 29 07:22:18 server sshd[13824]: error: Permissions 0755 for '/etc/ssh/ssh_host_dsa_key' are too open.
May 29 07:22:18 server sshd[13824]: error: It is recommended that your private key files are NOT accessible by others.
May 29 07:22:18 server sshd[13824]: error: This private key will be ignored.
May 29 07:22:18 server sshd[13824]: error: bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
May 29 07:22:18 server sshd[13824]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
May 29 07:22:18 server sshd[13824]: Disabling protocol version 1. Could not load host key
May 29 07:22:18 server sshd[13824]: Disabling protocol version 2. Could not load host key
May 29 07:22:18 server sshd[13824]: sshd: no hostkeys available -- exiting.

I've changed those permissions to the intended ones and started your sshd.

Please let me know if you need anything else.

--
Best regards,
    Posted On: 29 May 2008 08:31 AM

Does it look like I made a mistake one day and chmod my whole root directory 755 by accident?
can that bring other issues and security risks?
Kindly
Matthieu
   
    Posted On: 29 May 2008 08:53 AM
Hi Matthieu,

it depends what else you've set to 755 that can cause security issues because some files aren't supposed to be readable worldwide.

Playing with permissions is very dangerous, please refrain from those actions in the future especially if you are not familiar with the command syntax.

Let us know if you need anything else.

    Posted On: 29 May 2008 08:54 AM
Greetings,

it does not appear that the root directory has been altered with the chmod settings of 755. Below is a ls -la readout from your "/" directory please let us know if there is anything else we can assist you with.


-bash-3.00# ll
total 820
lrwxrwxrwx 1 root root 39 May 29 06:31 aquota.group -> /proc/vz/vzaquota/00000052/aquota.group
lrwxrwxrwx 1 root root 38 May 29 06:31 aquota.user -> /proc/vz/vzaquota/00000052/aquota.user
drwxr-xr-x 2 root root 2048 Mar 25 10:21 bin
drwxr-xr-x 2 root root 1024 Feb 21 2005 boot
drwxr-xr-x 2 root root 1024 May 27 05:16 dev
drwxr-xr-x 58 root root 5120 May 29 08:50 etc
drwxr-xr-x 25 root root 1024 May 29 06:31 home
drwxr-xr-x 2 root root 1024 Feb 21 2005 initrd
drwxr-xr-x 9 root root 3072 May 25 01:21 lib
drwxr-xr-x 2 root root 1024 Feb 21 2005 media
drwxr-xr-x 2 root root 1024 Feb 21 2005 mnt
drwxr-xr-x 2 root root 1024 Feb 21 2005 opt
dr-xr-xr-x 4160 root root 0 May 27 05:16 proc
drwxr-xr-x 2 root root 1024 May 28 09:00 public_ftp
drwxr-xr-x 3 root root 1024 May 28 09:00 public_html
-rw-r--r-- 1 root root 352540 Mar 16 17:25 reggaegu_joom1
-rw-r--r-- 1 root root 273798 Mar 16 17:25 reggaegu_joom1.sql
drwxr-xr-x 14 root root 1024 May 29 08:53 root
drwxr-xr-x 2 root root 3072 Mar 25 10:21 sbin
drwxr-xr-x 5 root root 13312 May 29 02:53 scripts
drwxr-xr-x 2 root root 1024 Feb 21 2005 selinux
drwxr-xr-x 2 root root 1024 Feb 21 2005 srv
-rw-r--r-- 1 root root 1024 Apr 27 2006 stunnel.rnd
drwxr-xr-x 2 root root 1024 Feb 21 2005 sys
drwxrwxrwt 5 root root 77824 May 29 08:52 tmp
drw-r--r-- 7 root wheel 1024 Aug 11 2004 unixbench-4.1.0-wht
-rw-r--r-- 1 root root 79705 Jul 18 2005 unixbench-4.1.0-wht.tar.gz
drwxr-xr-x 15 root root 1024 Sep 4 2007 usr
drwxr-xr-x 21 root root 1024 May 19 01:03 var
-bash-3.00#

Thanks,
    Posted On: 29 May 2008 08:57 AM

Hi,
well...
actually I'm trying to key these commands now but it's not working:

root@server [/]# chmod -R 755 /home/hotelboo/public_html/*root@server [/]# chmod -R 644 /home/hotelboo/public_html/*.*

I tried from root and I tried by going down in the folder as well....
command doesnt' seem to work fully...

I'm not sure if ssh doesnt' work properly of if command is wrong

Kindly
    Posted On: 29 May 2008 09:06 AM
Greetings,

You need to take the " * " and " *.* " off of your commands and they should work fine.

Thanks,
    Posted On: 29 May 2008 09:08 AM

hi,
thanks
but how can I different chmod for folders and files then...?Kindly
Matthieu

    Posted On: 29 May 2008 09:25 AM
Greetings
unfortunately if you wish to chmod the files and the directories to different permissions you need to do so manually one at a time. My advice would be to set the entire file tree to the permissions needed for the most common factor ( directories or files ) and then individually change the ownerships of the lesser group one at a time.
Thanks,

This website uses Cookies