11 Replies Latest reply: Aug 1, 2012 2:46 AM by Catch-22 RSS

    Write Failed: broken pipe

    abdul:
      hi ,

      when i am going to connect with remotely to another server i got an error:

      Write Failed: broken pipe

      my /etc/ssh/ssh_config file has this contents:

      [root@PGH-DB ssh]# cat ssh_config
      # $OpenBSD: ssh_config,v 1.25 2009/02/17 01:28:32 djm Exp $

      # This is the ssh client system-wide configuration file. See
      # ssh_config(5) for more information. This file provides defaults for
      # users, and the values can be changed in per-user configuration files
      # or on the command line.

      # Configuration data is parsed as follows:
      # 1. command line options
      # 2. user-specific file
      # 3. system-wide file
      # Any configuration value is only changed the first time it is set.
      # Thus, host-specific definitions should be at the beginning of the
      # configuration file, and defaults at the end.

      # Site-wide defaults for some commonly used options. For a comprehensive
      # list of available options, their meanings and defaults, please see the
      # ssh_config(5) man page.

      # Host *
      # ForwardAgent no
      # ForwardX11 no
      # RhostsRSAAuthentication no
      # RSAAuthentication yes
      # PasswordAuthentication yes
      # HostbasedAuthentication no
      # GSSAPIAuthentication no
      # GSSAPIDelegateCredentials no
      # GSSAPIKeyExchange no
      # GSSAPITrustDNS no
      # BatchMode no
      # CheckHostIP yes
      # AddressFamily any
      # ConnectTimeout 0
      # StrictHostKeyChecking ask
      # IdentityFile ~/.ssh/identity
      # IdentityFile ~/.ssh/id_rsa
      # IdentityFile ~/.ssh/id_dsa
      # Port 22
      # Protocol 2,1
      # Cipher 3des
      # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
      # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
      # EscapeChar ~
      # Tunnel no
      # TunnelDevice any:any
      # PermitLocalCommand no
      # VisualHostKey no
      Host *
      GSSAPIAuthentication yes
      # If this option is set to yes then remote X11 clients will have full access
      # to the original X11 display. As virtually no X11 client supports the untrusted
      # mode correctly we set this to yes.
      ForwardX11Trusted yes
      # Send locale-related environment variables
      SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
      SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
      SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
      SendEnv XMODIFIERS

      please help me out
        • 1. Re: Write Failed: broken pipe
          Catch-22
          What OS and Linux distribution/version are you using?
          What is the command you are using?
          What is the error message that appears on your screen.

          Generally you might want to do a verbose login with ssh to get more details about the login process, e.g.:

          <pre>
          ssh -v -v username@hostname_or_ip_address
          </pre>
          • 2. Re: Write Failed: broken pipe
            abdul:
            my os version is
            [root@PGH-DB ssh]# uname -a
            Linux PGH-DB 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

            i tryed t login remotely as :

            [root@PGH-DB ssh]# ssh oracle@192.168.1.13
            oracle@192.168.1.13's password:
            Write failed: Broken pipe

            still could not find reasonable soltion

            many thanks:)
            • 3. Re: Write Failed: broken pipe
              Catch-22
              The "-v -v" I have in my previous reply was on purpose and not a typing mistake. I suggest your try

              <pre>
              ssh -v -v oracle@192.168.1.13
              </pre>

              ... and monitor the output to see where the problem occurs.
              • 4. Re: Write Failed: broken pipe
                abdul:
                [root@PGH-DB ~]# ssh -v -v oracle@192.168.1.13
                OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
                debug1: Reading configuration data /etc/ssh/ssh_config
                debug1: Applying options for *
                debug2: ssh_connect: needpriv 0
                debug1: Connecting to 192.168.1.13 [192.168.1.13] port 22.
                debug1: Connection established.
                debug1: permanently_set_uid: 0/0
                debug1: identity file /root/.ssh/identity type -1
                debug1: identity file /root/.ssh/id_rsa type -1
                debug1: identity file /root/.ssh/id_dsa type -1
                debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
                debug1: match: OpenSSH_4.3 pat OpenSSH_4*
                debug1: Enabling compatibility mode for protocol 2.0
                debug1: Local version string SSH-2.0-OpenSSH_5.3
                debug2: fd 3 setting O_NONBLOCK
                debug1: SSH2_MSG_KEXINIT sent
                debug1: SSH2_MSG_KEXINIT received
                debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
                debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
                debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
                debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
                debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
                debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
                debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
                debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
                debug2: kex_parse_kexinit:
                debug2: kex_parse_kexinit:
                debug2: kex_parse_kexinit: first_kex_follows 0
                debug2: kex_parse_kexinit: reserved 0
                debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
                debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
                debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
                debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
                debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
                debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
                debug2: kex_parse_kexinit: none,zlib@openssh.com
                debug2: kex_parse_kexinit: none,zlib@openssh.com
                debug2: kex_parse_kexinit:
                debug2: kex_parse_kexinit:
                debug2: kex_parse_kexinit: first_kex_follows 0
                debug2: kex_parse_kexinit: reserved 0
                debug2: mac_setup: found hmac-md5
                debug1: kex: server->client aes128-ctr hmac-md5 none
                debug2: mac_setup: found hmac-md5
                debug1: kex: client->server aes128-ctr hmac-md5 none
                debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
                debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
                debug2: dh_gen_key: priv key bits set: 125/256
                debug2: bits set: 545/1024
                debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
                debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
                debug1: Host '192.168.1.13' is known and matches the RSA host key.
                debug1: Found key in /root/.ssh/known_hosts:1
                debug2: bits set: 499/1024
                debug1: ssh_rsa_verify: signature correct
                debug2: kex_derive_keys
                debug2: set_newkeys: mode 1
                debug1: SSH2_MSG_NEWKEYS sent
                debug1: expecting SSH2_MSG_NEWKEYS
                debug2: set_newkeys: mode 0
                debug1: SSH2_MSG_NEWKEYS received
                debug1: SSH2_MSG_SERVICE_REQUEST sent
                debug2: service_accept: ssh-userauth
                debug1: SSH2_MSG_SERVICE_ACCEPT received
                debug2: key: /root/.ssh/identity ((nil))
                debug2: key: /root/.ssh/id_rsa ((nil))
                debug2: key: /root/.ssh/id_dsa ((nil))
                debug1: Authentications that can continue: publickey,gssapi-with-mic,password
                debug1: Next authentication method: gssapi-with-mic
                debug1: Unspecified GSS failure. Minor code may provide more information
                Credentials cache file '/tmp/krb5cc_0' not found

                debug1: Unspecified GSS failure. Minor code may provide more information
                Credentials cache file '/tmp/krb5cc_0' not found

                debug1: Unspecified GSS failure. Minor code may provide more information


                debug2: we did not send a packet, disable method
                debug1: Next authentication method: publickey
                debug1: Trying private key: /root/.ssh/identity
                debug1: Trying private key: /root/.ssh/id_rsa
                debug1: Trying private key: /root/.ssh/id_dsa
                debug2: we did not send a packet, disable method
                debug1: Next authentication method: password
                oracle@192.168.1.13's password:
                debug2: we sent a password packet, wait for reply
                debug1: Authentications that can continue: publickey,gssapi-with-mic,password
                Permission denied, please try again.
                oracle@192.168.1.13's password:
                debug2: we sent a password packet, wait for reply
                debug1: Authentication succeeded (password).
                debug1: channel 0: new [client-session]
                debug2: channel 0: send open
                debug1: Entering interactive session.
                debug2: callback start
                debug2: client_session2_setup: id 0
                debug2: channel 0: request pty-req confirm 1
                debug1: Sending environment.
                debug1: Sending env LANG = en_US.UTF-8
                debug2: channel 0: request env confirm 0
                debug2: channel 0: request shell confirm 1
                debug2: fd 3 setting TCP_NODELAY
                debug2: callback done
                debug2: channel 0: open confirm rwindow 0 rmax 32768

                and it got hanged here..!
                • 5. Re: Write Failed: broken pipe
                  Catch-22
                  Well, unfortunately it seems this type of issue can have several causes.

                  Are you using a wireless connection?
                  What happens when you try to login as a different user?
                  • 6. Re: Write Failed: broken pipe
                    abdul:
                    dude,


                    i am using broadband connection and when i ever try to login as another its open normally


                    thanks
                    • 7. Re: Write Failed: broken pipe
                      Catch-22
                      In this case you may have something goofed up in your Oracle user account profile. I suggest to analyze or rename your profile files, like .bashrc, .bash_profile, or any other profile file according to what is your default shell.
                      • 8. Re: Write Failed: broken pipe
                        abdul:
                        dude,

                        see my .bash_profile has following contents:

                        [oracle@PGH-DB ~]$ cat . .bash_profile
                        cat: .: Is a directory
                        # .bash_profile

                        # Get the aliases and functions
                        if [ -f ~/.bashrc ]; then
                        . ~/.bashrc
                        fi

                        # User specific environment and startup programs

                        PATH=$PATH:$HOME/bin

                        export PATH

                        ORACLE_BASE=/opt/oracle
                        ORACLE_HOME=$ORACLE_BASE/102
                        ORACLE_SID=pghotel
                        LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32
                        PATH=$PATH:$ORACLE_HOME/bin
                        TMP=/tmp
                        export TMP
                        TMPDIR=$TMP
                        export TMPDIR

                        export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH



                        so what changes/updation i should perform to overcome this issue:)

                        thanks
                        • 9. Re: Write Failed: broken pipe
                          Catch-22
                          You could try to do

                          <pre>
                          cat -vet .bash_profile
                          </pre>

                          to see if there are any non printable characters.

                          To troubleshoot your login, you can try the following:

                          Login as user "oracle" or use "su oracle" as root. Then type:

                          <pre>
                          $SHELL -lx
                          </pre>

                          and check if and where it fails.
                          • 10. Re: Write Failed: broken pipe
                            abdul:
                            dude,

                            i can get it($SHELL -lx) run

                            thanks
                            • 11. Re: Write Failed: broken pipe
                              Catch-22
                              Sorry but your last response doesn't compute. Please be more specific.