• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Ssh server unexpectedly closed network

General pfSense Questions
4
8
3.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    gdy1039
    last edited by Mar 1, 2013, 9:20 AM

    pfsnese2.0.2

    I enable sshd by type "14" in the shell without any other config.
    then I use putty 0.60 connect it through lan interface.

    after input user name and password,it login success
    in this time, if put a "Enter" input,
    I will lost the connect, and get a error "server unexpectedly closed network connection"

    if I input a number, for example 8
    I can use the shell normal.

    does someone know how to correct it?
    thanks?

    1 Reply Last reply Reply Quote 0
    • W
      wallabybob
      last edited by Mar 1, 2013, 9:56 AM

      @gdy1039:

      does someone know how to correct it?

      What do you think is the correct behaviour? When I do … I see ... but I expect to see ...

      On my system shell option 14 is to DISABLE sshd server. (But maybe option 14 toggles sshd server enable/disable.)

      When you give an invalid input to the menu I am not surprised your invalid selection results in closing of your ssh session.

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by Mar 1, 2013, 12:06 PM

        I just checked this on my 2.1-BETA1 system. Yes, pressing return at the menu gives the "server unexpectedly closed network connection" message, and that is the end of the SSH session. I thought it used to redisplay the menu after pressing return - but maybe that is my memory confusing this with the behaviour of the real console.
        Normally you enter menu options (e.g. 8 to shell, 0 to logout) so don't see this "feature". I wonder what happens on a 2.0.1 system? Anyone out there still on 2.0.1 could try and post the result.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • W
          wallabybob
          last edited by Mar 1, 2013, 9:36 PM

          @phil.davis:

          Anyone out there still on 2.0.1 could try and post the result.

          From my 2.0.1 system:

          1. Logout (SSH only)                  8) Shell
          2. Assign Interfaces                  9) pfTop
          3. Set interface(s) IP address      10) Filter Logs
          4. Reset webConfigurator password    11) Restart webConfigurator
          5. Reset to factory defaults        12) pfSense Developer Shell
          6. Reboot system                    13) Upgrade from console
          7. Halt system                      14) Disable Secure Shell (sshd)
          8. Ping host

          Enter an option:

          Connection to pfsense closed by remote host.
          Connection to pfsense closed.
          $

          I hit the Enter key at the Enter an option prompt.

          1 Reply Last reply Reply Quote 0
          • C
            cmb
            last edited by Mar 1, 2013, 9:50 PM

            Just hitting "Enter" there has always disconnected the session by design, going back to the very early days. To log out of a SSH session from a command prompt, "exit", enter enter.

            1 Reply Last reply Reply Quote 0
            • G
              gdy1039
              last edited by Mar 4, 2013, 3:02 AM

              thanks for all peoples reply

              to:wallabybob
              in the local shello, "Enter" is a valid input.
              I except to see a redisplay menu.
              so I try to do this in the remote ssh shell

              to:cmb
              It's bad news for me this a normal behavior.
              If the screen is flushed by some message,how can i redisplay menu?

              and question 2:
              in local shell,<ctrl>+ <c>can terminate running job and return to menu,for example command 7 of "ping"
              in ssh, It will close the connect.
              so how to terminate a running jobs?</c></ctrl>

              1 Reply Last reply Reply Quote 0
              • W
                wallabybob
                last edited by Mar 4, 2013, 4:06 AM

                @gdy1039:

                If the screen is flushed by some message,how can i redisplay menu?

                8 (to select the shell) then Ctrl-D to exit the shell and return to the menu.

                @gdy1039:

                in ssh, It will close the connect.

                It doesn't for me: If I ssh into pfSense, select option 8 (Shell) , start a ping then type Ctrl-C the ping terminates and I get a shell prompt.

                If your ssh sessions behave differently, please provide more details such as the system you ssh'd from and exactly what you are doing. Screen capture would probably be helpful.

                1 Reply Last reply Reply Quote 0
                • G
                  gdy1039
                  last edited by Mar 4, 2013, 5:53 AM Mar 4, 2013, 5:51 AM

                  It doesn't for me: If I ssh into pfSense, select option 8 (Shell) , start a ping then type Ctrl-C the ping terminates and I get a shell prompt.

                  If your ssh sessions behave differently, please provide more details such as the system you ssh'd from and exactly what you are doing. Screen capture would probably be helpful.

                  I test what you say,yeah, I can type ctrl+C terminate ping in local shell.
                  but I mean's in the pfsense menu selected option 7 to ping host.

                  ok,get in the shell and then ctrl+D is a good way to redispay the menu.
                  thanks.

                  1 Reply Last reply Reply Quote 0
                  5 out of 8
                  • First post
                    5/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.