WebFaction
Community site: login faq

Happy webfaction customer for many years. A couple of days ago was migrated from one server to a newer one with CentOS 7 on.

Since then, commands that scp files to my account (from elsewhere) have started to emit "stdin: is not a tty" warnings, on sterr. This never used to happen before the migration.

Example command and response (stderr is shown):

>$ scp -q /tmp/test.txt mozz@mozz.webfactional.com:~/test.txt
stdin: is not a tty

Same thing happens when I do git pull in a local checkout of a repo hosted on the same server.

Can anyone on here help me understand why this is happening? Seems as if something on Webfaction's server might be mistakenly assuming there is a tty attached (which is not the case for scp and git, if I understand things correctly).

Thanks for any help. Note: have asked same question of Webfaction support. Will post solution here, in case it helps others, if one is forthcoming.

asked 16 Mar, 11:44

mozz's gravatar image

mozz
235
accept rate: 0%


This seems to be the default behavior for the newer version of OpenSSH on our CentOS7 servers - it outputs a warning to let you know that your connection isn't using a TTY. It seems to be triggered by something in the global bashrc, but I'm not exactly sure what it causing it.

If it causes problems for you, you can prevent the message by adding the following line to your .bashrc on the server, as the very first line in the file:

[ -z "$PS1" ] && return

That basically says "if there's no prompt, then don't read the rest of this file".

Hope that helps!

permanent link

answered 16 Mar, 18:35

seanf's gravatar image

seanf ♦♦
11.4k21233
accept rate: 37%

Thanks, that suppresses the message. I have been getting it in emails from cron jobs that previously had silence on stderr.

(17 Mar, 14:14) mozz mozz's gravatar image

Thanks, this fix works for me too. But just to check understanding: is this only a temporary fix? i.e. are you going to amend the global bashrc, and then should we take this line out again?

(18 Mar, 16:42) atherton atherton's gravatar image

We'll try to make a global fix for this in the near future.

(20 Mar, 17:18) seanf ♦♦ seanf's gravatar image

We're slowly rolling out a fix across our systems at this time.

(30 Mar, 13:40) seanf ♦♦ seanf's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×21
×5

question asked: 16 Mar, 11:44

question was seen: 434 times

last updated: 30 Mar, 13:40

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM