Linux Lite Forums

General => Security & Bug Fixes => Topic started by: Udayendu Kar on June 05, 2020, 03:52:03 AM

Title: ssh & rsync failed due to custom .bashrc
Post by: Udayendu Kar on June 05, 2020, 03:52:03 AM


    ---
    stty: standard input: Inappropriate ioctl for device
    protocol version mismatch -- is your shell clean?
    (see the rsync man page for an explanation)
    rsync error: protocol incompatibility (code 2) at /home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/compat.c(174) [Receiver=3.0.9]
    ---



This is happening as we have those echo lined in .bashrc. After removing those .bashrc, its working well. Can we findout an alternative to handle those entries in .bashrc ?
Title: Re: ssh & rsync failed due to custom .bashrc
Post by: trinidad on June 05, 2020, 08:03:27 AM
SCP works fine for me both directions. Post the SCP command you ran.

TC
Title: Re: ssh & rsync failed due to custom .bashrc
Post by: Udayendu Kar on July 16, 2020, 01:39:52 AM
>>> Post the SCP command you ran.

        What to run post scp command ?

I have tried on other linux distro as well. Its happening when we have some echo command in .bashrc file. If we will remove that entry, its working perfectly.
Not sure how its working for you. Make sure to do scp with some remote system instead of this system.
Title: Re: ssh & rsync failed due to custom .bashrc
Post by: trinidad on November 14, 2020, 10:23:32 AM
This is not a bug @Jerry. Either a praxis or syntax error by this specific user. They have not replied, so I cannot correct them.

TC
Title: Re: ssh & rsync failed due to custom .bashrc
Post by: jbz on February 15, 2021, 10:10:14 AM
Hello,

For scp assure that .bashrc echo nothing

add at top of bashrc test if interactive

# if not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

inspired from ubuntu .bashrc

sorry for bad english