Protocol Error Unexpected Newline Ssh
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top scp returns “unexpected
ssh is working but not scp neither sftp) Posted on 06/04/2012 by Sims A quick solution for a problem I encountered : protocol error: unexpected newline I can ssh to a host , but I cannot scp, I cannot sftp. The problem was because of my banner, of my bashrc. Check out your banner, which ever shell you are using, if there is a blank line, a line break, it will prevent scp/sftp from working. Or even worse if it has been created on Windows, try using a tofrodos, to re-format it http://serverfault.com/questions/328363/scp-returns-unexpected-newline-error for Linux. Small part of my ssh debug logs while encoutering the problem : Apr 6 11:36:54 myhost sshd[20625]: debug1: SELinux support disabled Apr 6 11:36:54 myhost sshd[20625]: debug1: PAM: reinitializing credentials Apr 6 11:36:54 myhost sshd[20625]: debug1: permanently_set_uid: 0/0 Apr 6 11:36:54 myhost sshd[20365]: debug1: Received SIGCHLD. Apr 6 11:36:54 myhost sshd[20365]: debug1: session_by_pid: pid 20625 Apr 6 11:36:54 myhost sshd[20365]: debug1: http://net-admin.fr/protocol-error-unexpected-ssh-is-working-but-not-scp-neither-sftp/ session_exit_message: session 0 channel 0 pid 20625 Apr 6 11:36:54 myhost sshd[20365]: debug1: session_exit_message: release channel 0 Apr 6 11:36:54 myhost sshd[20365]: debug1: server_input_channel_req: channel 0 request eow@openssh.com reply 0 Apr 6 11:36:54 myhost sshd[20365]: Received disconnect from 10.0.0.1: 11: disconnected by user Apr 6 11:36:54 myhost sshd[20365]: debug1: do_cleanup Apr 6 11:36:54 myhost sshd[20365]: debug1: PAM: cleanup Apr 6 11:36:54 myhost sshd[20365]: debug1: PAM: closing session Apr 6 11:36:54 myhost sshd[20365]: pam_unix(sshd:session): session closed for user root Apr 6 11:36:54 myhost sshd[20365]: debug1: PAM: deleting credentials Posted in Non classé | « MySQL Create User and give privileges Debian Squeeze SNMP » Leave a comment Cancel reply Your email address will not be published. Required fields are marked * Name * Email * Website Comment You may use these HTML tags and attributes:
CategoriesDatabase SQL MySQL PostgresSQL JPQL Network CISCO PAO Gimp Programmation Java iText (PDF edition) POI (XLS edition) JavaEE JSF Rich Faces JBoss Seam JPQL System Debian Tomcat Linux Nagios © Network and System Admin
enter a title. You can not post a blank message. Please type https://discussions.apple.com/thread/3611216?tstart=0 your message and try again. luis156 Level 1 http://www.linuxquestions.org/questions/linux-newbie-8/scp-and-sftp-problem-717709/ (0 points) Q: scp doesn't work! I'm trying to scp into my computer at work but it won't let me. Its keeps giving me a new line error any help is greatly appreciatedscp -v lea529@login.astro.ufl.edu:/astro/data/dingo1/peterb/images/reg10 protocol error /reg10Executing: program /usr/bin/ssh host login.astro.ufl.edu, user lea529, command scp -v -f /astro/data/dingo1/peterb/images/reg10OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009debug1: Reading configuration data /etc/ssh_configdebug1: Connecting to login.astro.ufl.edu [128.227.184.226] port 22.debug1: Connection established.debug1: identity file /Users/luis/.ssh/identity type -1debug1: identity file /Users/luis/.ssh/id_rsa type -1debug1: identity file /Users/luis/.ssh/id_dsa type -1debug1: protocol error unexpected Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu7debug1: match: OpenSSH_5.3p1 Debian-3ubuntu7 pat OpenSSH*debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_5.2debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: server->client aes128-ctr hmac-md5 nonedebug1: kex: client->server aes128-ctr hmac-md5 nonedebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sentdebug1: expecting SSH2_MSG_KEX_DH_GEX_GROUPdebug1: SSH2_MSG_KEX_DH_GEX_INIT sentdebug1: expecting SSH2_MSG_KEX_DH_GEX_REPLYdebug1: Host 'login.astro.ufl.edu' is known and matches the DSA host key.debug1: Found key in /Users/luis/.ssh/known_hosts:1debug1: ssh_dss_verify: signature correctdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: SSH2_MSG_SERVICE_REQUEST sentdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickey,password,hostbaseddebug1: Next authentication method: publickeydebug1: Trying private key: /Users/luis/.ssh/identitydebug1: Trying private key: /Users/luis/.ssh/id_rsadebug1: Trying private key: /Users/luis/.ssh/id_dsadebug1: Next authentication method: passwordlea529@login.astro.ufl.edu's password: debug1: Authentication succeeded (password).debug1: channel 0: new [client-session]debug1: Requesting no-more-sessions@openssh.comdebug1: Entering interactive session.debug1: Sending command: scp -v -f /astro/data/dingo1/peterb/images/reg10nm: Command not found.nm: Command not found.readelf: Command not found.protocol error: unexpected
Tags Search LQ Wiki Search Tutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie scp and sftp problem User Name Remember Me? Password Linux - Newbie This Linux forum is for members that are new to Linux. Just starting out and have a question? If it is not in the man pages or the how-to's this is the place! Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Search this Thread 04-08-2009, 09:27 AM #1 psi_mon LQ Newbie