Stack Exchange Network

Stack Exchange network consists of 181 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange

Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.

Sign up to join this community

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

When I try to scp a file to my remote server I get the following error:

stty: standard input: Invalid argument

This is caused by a line in my .bashrc file:

stty -ixon

If I remove that line, the error goes away. however, if I remove that line, then when I ssh in, if I accidentally hit [CTRL]+S then the shell freezes and it takes me a while to figure out what happened.

Is there any way to resolve this? to prevent that error without removing that line from .bashrc, or some other way to prevent [CTRL]+S from freezing the terminal?

You need to run the stty command only if it's an interactive login. See serverfault.com/questions/146745/… – Ciclamino Jan 15, 2016 at 15:54

Thanks for contributing an answer to Super User!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.