Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Server Inaccessible: Port 22 all of a Sudden Closed

  1. #1
    Join Date
    Jul 2012
    Beans
    26

    Exclamation Server Inaccessible: Port 22 all of a Sudden Closed

    Hello,

    I have 2 Kimsufi 2G servers with a Ubuntu Desktop 12.04 distro.

    All of a sudden one of the servers has become inaccessible and support told me that port 22 on secure shell is closed.

    They also told me that I have to sort it myself through secure mode but, to be honest, I don't know exactly what to do.

    I didn't install, update or modify anything on the server so have no clue why all of a sudden it's inaccessible.
    I can access the other server without any problem.

    So far, on some friends' suggestions, I ran the following commands although I cannot read the results:

    root@rescue:~# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    root@rescue:~# Chain INPUT (policy ACCEPT)
    -bash: syntax error near unexpected token `('
    root@rescue:~# target prot opt source destination
    -bash: target: command not found
    root@rescue:~#
    root@rescue:~# Chain FORWARD (policy ACCEPT)
    -bash: syntax error near unexpected token `('
    root@rescue:~# target prot opt source destination
    -bash: target: command not found
    root@rescue:~#
    root@rescue:~# Chain OUTPUT (policy ACCEPT)
    -bash: syntax error near unexpected token `('
    root@rescue:~# target prot opt source destination
    -bash: target: command not found
    root@rescue:~# root@rescue:~#
    -bash: root@rescue:~#: command not found
    root@rescue:~#

    root@rescue:~# sudo apt-get openssh-server openssh-client
    E: Invalid operation openssh-server
    root@rescue:~#

    Any help appreciated as it's almost a week that I cannot access the server.

    Thank you

  2. #2
    Join Date
    Jul 2007
    Location
    Atlanta, GA
    Beans
    89
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    to install openssh-server you need to use sudo apt-get install openssh-server.

    if it says it is already installed, use:
    sudo apt-get install --reinstall openssh-server


    you won't need openssh client as you probably won't be terminaling to another server from that server. just openssh server is needed to access that server via terminal.
    An expert is a man who has made all the mistakes which can be made in a very narrow field.
    -Niels Bohr

  3. #3
    Join Date
    Jul 2012
    Beans
    26

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Insomn1a View Post
    to install openssh-server you need to use sudo apt-get install openssh-server.

    if it says it is already installed, use:
    sudo apt-get install --reinstall openssh-server


    you won't need openssh client as you probably won't be terminaling to another server from that server. just openssh server is needed to access that server via terminal.
    Hello Insomn1a, thank you for your reply.

    I got this:

    root@rescue:~# sudo apt-get install openssh-server
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to write to /var/cache/apt/
    E: The package lists or status file could not be parsed or opened.
    root@rescue:~#

    I don't understand the results, do you or anyone else please?

    I also don't understand this part:
    "you won't need openssh client as you probably won't be terminaling to another server from that server. just openssh server is needed to access that server via terminal."

    What exactly are you asking me to do?

    Thank you

  4. #4
    Join Date
    Jul 2007
    Location
    Atlanta, GA
    Beans
    89
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Thresholder View Post
    Hello Insomn1a, thank you for your reply.

    I got this:

    root@rescue:~# sudo apt-get install openssh-server
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to write to /var/cache/apt/
    E: The package lists or status file could not be parsed or opened.
    root@rescue:~#

    I don't understand the results, do you or anyone else please?

    I also don't understand this part:
    "you won't need openssh client as you probably won't be terminaling to another server from that server. just openssh server is needed to access that server via terminal."

    What exactly are you asking me to do?

    Thank you
    What i am saying is that if you are wanting to connect to a server via SSH, openssh client installed on said server is not required, the only requirement for ssh to work on a server is openssh-server

    try doing this in terminal

    sudo apt-get update
    sudo apt-get upgrade

    then try reinstall openssh server


    sudo apt-get install --reinstall openssh-server
    An expert is a man who has made all the mistakes which can be made in a very narrow field.
    -Niels Bohr

  5. #5
    Join Date
    Jul 2012
    Beans
    26

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Insomn1a View Post
    What i am saying is that if you are wanting to connect to a server via SSH, openssh client installed on said server is not required, the only requirement for ssh to work on a server is openssh-server

    try doing this in terminal

    sudo apt-get update
    sudo apt-get upgrade

    then try reinstall openssh server


    sudo apt-get install --reinstall openssh-server
    Gotcha thanks for the clarification.

    I tried just updating and I get this:

    root@rescue:~# sudo apt-get update
    Ign http://hwraid.le-vert.net squeeze Release.gpg
    Ign http://hwraid.le-vert.net/debian/ squeeze/main Translation-en
    Ign http://hwraid.le-vert.net squeeze Release
    Ign http://hwraid.le-vert.net squeeze/main i386 Packages/DiffIndex
    Ign http://hwraid.le-vert.net squeeze/main i386 Packages
    Ign http://hwraid.le-vert.net squeeze/main i386 Packages
    Err http://hwraid.le-vert.net squeeze/main i386 Packages
    Could not open file /var/lib/apt/lists/partial/hwraid.le-vert.net_debian_dists_squeeze_main_binary-i386_Packages - open (30: Read-only file system)
    Ign http://security.debian.org squeeze/updates Release.gpg
    Ign http://security.debian.org/ squeeze/updates/main Translation-en
    Ign http://security.debian.org squeeze/updates Release
    Ign http://security.debian.org squeeze/updates/main Sources/DiffIndex
    Ign http://security.debian.org squeeze/updates/main i386 Packages/DiffIndex
    Ign http://security.debian.org squeeze/updates/main Sources
    Ign http://debian.mirrors.ovh.net squeeze Release.gpg
    Ign http://debian.mirrors.ovh.net/debian/ squeeze/contrib Translation-en
    Ign http://debian.mirrors.ovh.net/debian/ squeeze/main Translation-en
    Ign http://debian.mirrors.ovh.net/debian/ squeeze/non-free Translation-en
    Ign http://debian.mirrors.ovh.net squeeze Release
    Ign http://debian.mirrors.ovh.net squeeze/main Sources/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/main i386 Packages/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/contrib i386 Packages/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/non-free i386 Packages/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/main Sources
    Ign http://debian.mirrors.ovh.net squeeze/main i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/contrib i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/non-free i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/main Sources
    Ign http://debian.mirrors.ovh.net squeeze/main i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/contrib i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/non-free i386 Packages
    Err http://debian.mirrors.ovh.net squeeze/main Sources
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_s ource_Sources - open (30: Read-only file system) [IP: 91.121.124.139 80]
    Err http://debian.mirrors.ovh.net squeeze/main i386 Packages
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_b inary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]
    Err http://debian.mirrors.ovh.net squeeze/contrib i386 Packages
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_contri b_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.124.139 80]
    Err http://debian.mirrors.ovh.net squeeze/non-free i386 Packages
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_non-free_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]
    Ign http://security.debian.org squeeze/updates/main i386 Packages
    Ign http://security.debian.org squeeze/updates/main Sources
    Ign http://security.debian.org squeeze/updates/main i386 Packages
    Err http://security.debian.org squeeze/updates/main Sources
    Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_sou rce_Sources - open (30: Read-only file system) [IP: 195.20.242.89 80]
    Err http://security.debian.org squeeze/updates/main i386 Packages
    Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_bin ary-i386_Packages - open (30: Read-only file system) [IP: 212.211.132.32 80]
    W: Not using locking for read only lock file /var/lib/apt/lists/lock
    W: Failed to fetch http://hwraid.le-vert.net/debian/dis...86/Packages.gz Could not open file /var/lib/apt/lists/partial/hwraid.le-vert.net_debian_dists_squeeze_main_binary-i386_Packages - open (30: Read-only file system)

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...rce/Sources.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_s ource_Sources - open (30: Read-only file system) [IP: 91.121.124.139 80]

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...86/Packages.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_b inary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...86/Packages.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_contri b_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.124.139 80]

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...86/Packages.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_non-free_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]

    W: Failed to fetch http://security.debian.org/dists/squ...rce/Sources.gz Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_sou rce_Sources - open (30: Read-only file system) [IP: 195.20.242.89 80]

    W: Failed to fetch http://security.debian.org/dists/squ...86/Packages.gz Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_bin ary-i386_Packages - open (30: Read-only file system) [IP: 212.211.132.32 80]

    E: Some index files failed to download, they have been ignored, or old ones used instead.
    W: Not using locking for read only lock file /var/lib/dpkg/lock



    root@rescue:~# sudo apt-get upgrade
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to write to /var/cache/apt/
    E: The package lists or status file could not be parsed or opened.
    root@rescue:~#

    root@rescue:~# sudo apt-get install --reinstall openssh-server
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to write to /var/cache/apt/
    E: The package lists or status file could not be parsed or opened.
    root@rescue:~#

    P.s. I would like to paste all the results in those scrollable windows but have no clue how

  6. #6
    Join Date
    Jul 2007
    Location
    Atlanta, GA
    Beans
    89
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Thresholder View Post
    Gotcha thanks for the clarification.

    I tried just updating and I get this:

    root@rescue:~# sudo apt-get update
    Ign http://hwraid.le-vert.net squeeze Release.gpg
    Ign http://hwraid.le-vert.net/debian/ squeeze/main Translation-en
    Ign http://hwraid.le-vert.net squeeze Release
    Ign http://hwraid.le-vert.net squeeze/main i386 Packages/DiffIndex
    Ign http://hwraid.le-vert.net squeeze/main i386 Packages
    Ign http://hwraid.le-vert.net squeeze/main i386 Packages
    Err http://hwraid.le-vert.net squeeze/main i386 Packages
    Could not open file /var/lib/apt/lists/partial/hwraid.le-vert.net_debian_dists_squeeze_main_binary-i386_Packages - open (30: Read-only file system)
    Ign http://security.debian.org squeeze/updates Release.gpg
    Ign http://security.debian.org/ squeeze/updates/main Translation-en
    Ign http://security.debian.org squeeze/updates Release
    Ign http://security.debian.org squeeze/updates/main Sources/DiffIndex
    Ign http://security.debian.org squeeze/updates/main i386 Packages/DiffIndex
    Ign http://security.debian.org squeeze/updates/main Sources
    Ign http://debian.mirrors.ovh.net squeeze Release.gpg
    Ign http://debian.mirrors.ovh.net/debian/ squeeze/contrib Translation-en
    Ign http://debian.mirrors.ovh.net/debian/ squeeze/main Translation-en
    Ign http://debian.mirrors.ovh.net/debian/ squeeze/non-free Translation-en
    Ign http://debian.mirrors.ovh.net squeeze Release
    Ign http://debian.mirrors.ovh.net squeeze/main Sources/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/main i386 Packages/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/contrib i386 Packages/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/non-free i386 Packages/DiffIndex
    Ign http://debian.mirrors.ovh.net squeeze/main Sources
    Ign http://debian.mirrors.ovh.net squeeze/main i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/contrib i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/non-free i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/main Sources
    Ign http://debian.mirrors.ovh.net squeeze/main i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/contrib i386 Packages
    Ign http://debian.mirrors.ovh.net squeeze/non-free i386 Packages
    Err http://debian.mirrors.ovh.net squeeze/main Sources
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_s ource_Sources - open (30: Read-only file system) [IP: 91.121.124.139 80]
    Err http://debian.mirrors.ovh.net squeeze/main i386 Packages
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_b inary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]
    Err http://debian.mirrors.ovh.net squeeze/contrib i386 Packages
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_contri b_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.124.139 80]
    Err http://debian.mirrors.ovh.net squeeze/non-free i386 Packages
    Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_non-free_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]
    Ign http://security.debian.org squeeze/updates/main i386 Packages
    Ign http://security.debian.org squeeze/updates/main Sources
    Ign http://security.debian.org squeeze/updates/main i386 Packages
    Err http://security.debian.org squeeze/updates/main Sources
    Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_sou rce_Sources - open (30: Read-only file system) [IP: 195.20.242.89 80]
    Err http://security.debian.org squeeze/updates/main i386 Packages
    Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_bin ary-i386_Packages - open (30: Read-only file system) [IP: 212.211.132.32 80]
    W: Not using locking for read only lock file /var/lib/apt/lists/lock
    W: Failed to fetch http://hwraid.le-vert.net/debian/dis...86/Packages.gz Could not open file /var/lib/apt/lists/partial/hwraid.le-vert.net_debian_dists_squeeze_main_binary-i386_Packages - open (30: Read-only file system)

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...rce/Sources.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_s ource_Sources - open (30: Read-only file system) [IP: 91.121.124.139 80]

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...86/Packages.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_main_b inary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...86/Packages.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_contri b_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.124.139 80]

    W: Failed to fetch http://debian.mirrors.ovh.net/debian...86/Packages.gz Could not open file /var/lib/apt/lists/partial/debian.mirrors.ovh.net_debian_dists_squeeze_non-free_binary-i386_Packages - open (30: Read-only file system) [IP: 91.121.125.139 80]

    W: Failed to fetch http://security.debian.org/dists/squ...rce/Sources.gz Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_sou rce_Sources - open (30: Read-only file system) [IP: 195.20.242.89 80]

    W: Failed to fetch http://security.debian.org/dists/squ...86/Packages.gz Could not open file /var/lib/apt/lists/partial/security.debian.org_dists_squeeze_updates_main_bin ary-i386_Packages - open (30: Read-only file system) [IP: 212.211.132.32 80]

    E: Some index files failed to download, they have been ignored, or old ones used instead.
    W: Not using locking for read only lock file /var/lib/dpkg/lock



    root@rescue:~# sudo apt-get upgrade
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to write to /var/cache/apt/
    E: The package lists or status file could not be parsed or opened.
    root@rescue:~#

    root@rescue:~# sudo apt-get install --reinstall openssh-server
    W: Not using locking for read only lock file /var/lib/dpkg/lock
    E: Unable to write to /var/cache/apt/
    E: The package lists or status file could not be parsed or opened.
    root@rescue:~#

    P.s. I would like to paste all the results in those scrollable windows but have no clue how
    wait a second, are you in recovery mode? reboot that server.

    sudo shutdown -g0 -y -r
    An expert is a man who has made all the mistakes which can be made in a very narrow field.
    -Niels Bohr

  7. #7
    Join Date
    Jul 2012
    Beans
    26

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Insomn1a View Post
    wait a second, are you in recovery mode? reboot that server.

    sudo shutdown -g0 -y -r
    Yes I think I mentioned it at the beginning.
    They call it rescue mode.

    Before I reboot there are also some tests that I can run (I have data in the servers) as outlined here:
    http://help.ovh.co.uk/RescueMode
    Anything you might want me to test before I reboot?

    Thank you

  8. #8
    Join Date
    Jul 2007
    Location
    Atlanta, GA
    Beans
    89
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Thresholder View Post
    Yes I think I mentioned it at the beginning.
    They call it rescue mode.

    Before I reboot there are also some tests that I can run (I have data in the servers) as outlined here:
    http://help.ovh.co.uk/RescueMode
    Anything you might want me to test before I reboot?

    Thank you
    the reason we cannot reinstall openssh is because by default some of the file system is read only in recovery console, at least with your system it is, what we need to do is get out of the recovery console and boot into your normal operating system.

    If you have physical access to these servers, then perform the following:

    sudo shutdown -g0 -y -r

    whenever the server fully reboots and is at a login prompt, login using your credentials.

    after logging in, do the following:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install --reinstall openssh-server

    then test ssh connection to the server, if you still cannot get a connection to the server then my next question is:

    do you have any firewalls installed or running on these servers?
    An expert is a man who has made all the mistakes which can be made in a very narrow field.
    -Niels Bohr

  9. #9
    Join Date
    Jul 2012
    Beans
    26

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Insomn1a View Post
    the reason we cannot reinstall openssh is because by default some of the file system is read only in recovery console, at least with your system it is, what we need to do is get out of the recovery console and boot into your normal operating system.

    If you have physical access to these servers, then perform the following:

    sudo shutdown -g0 -y -r

    whenever the server fully reboots and is at a login prompt, login using your credentials.

    after logging in, do the following:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install --reinstall openssh-server

    then test ssh connection to the server, if you still cannot get a connection to the server then my next question is:

    do you have any firewalls installed or running on these servers?
    Hi Insomn1a,

    I don't think that is actually possible since the only way I can actually log into the server is through rescue mode and I do not have physical access to the servers as they are in a server farm in another country.

    Any other suggestions?

    Thank you

  10. #10
    Join Date
    Jul 2007
    Location
    Atlanta, GA
    Beans
    89
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Server Inaccessible: Port 22 all of a Sudden Closed

    Quote Originally Posted by Thresholder View Post
    Hi Insomn1a,

    I don't think that is actually possible since the only way I can actually log into the server is through rescue mode and I do not have physical access to the servers as they are in a server farm in another country.

    Any other suggestions?

    Thank you
    in the rescue console, try

    mount -o rw,remount /

    then try the previous commands i had mentioned

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install --reinstall openssh-server
    An expert is a man who has made all the mistakes which can be made in a very narrow field.
    -Niels Bohr

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •