TIPS: “stdin is not a tty” when using SCP

SCP / SSH may not need a (pseudo-)terminal but something may expect it regardless on the remote end.

Does any global or personal shell resource files contain “stty” or “mesg” (‘egrep -r “stty|mesg” /etc/bashrc /etc/profile /etc/profile.d ~/.bashrc ~/.bash_profile;’)? For example:

root@server [/]# egrep -r "stty|mesg" /etc/bashrc /etc/profile /etc/profile.d ~/.bashrc ~/.bash_profile
/etc/bashrc:mesg y
root@server [/]#

If exactly as above, then you need just to comment this row in /etc/bashrc file.

Scroll to top