Questions tagged [tty]

70 questions
81
votes
5 answers

What is the benefit of not allocating a terminal in ssh?

Every once in a while I will do something like ssh user@host sudo thing and I am reminded that ssh doesn't allocate a pseudo-tty by default. Why doesn't it? What benefits would I be losing if I aliased ssh to ssh -t?
Chas. Owens
  • 2,013
  • 2
  • 20
  • 24
64
votes
4 answers

How can I launch a screen session with a command over ssh on a remote server from my desktop?

I want to be able to launch screen sessions on remote servers from a single ssh command on my desktop. However, screen seems to need a terminal, which is not available when running a command through ssh. So the obvious ssh root@my.machine screen…
Thomas Vander Stichele
  • 1,055
  • 4
  • 14
  • 16
34
votes
3 answers

What does "the input device is not a TTY" exactly mean in "docker run" output?

This is a command that works: $ echo 'hi there' | docker run -i ubuntu cat hi there This is a command that responds with an error message: $ echo 'hi there' | docker run -it ubuntu cat the input device is not a TTY I would like to figure out…
Mikhail Vasin
  • 579
  • 1
  • 4
  • 9
31
votes
3 answers

Did a cat /dev/urandom - Broken terminal

Out of curiosity, when your shell character set breaks from doing something like cat /dev/urandom is there a way to fix that in place?
12
votes
3 answers

"debug1: read_passphrase: can't open /dev/tty: No such device or address" when trying to connect through SSH

I am trying to connect to my server using ssh user@server.com -vv I get debug1: read_passphrase: can't open /dev/tty: No such device or address error or just Permission denied, please try again. Permission denied, please try again. Permission…
LukLed
  • 223
  • 1
  • 3
  • 11
8
votes
2 answers

How to find out the currently active linux virtual terminal while connected via ssh?

The situation is as follows. I have a multiuser desktop machine with Debian Linux 6.0 and an ATI videocard with one monitor connected. I have root access to it. There can be several KDE sessions started, like this: $ w 21:51:30 up ? days, 4:22, ?…
vadipp
  • 449
  • 2
  • 4
  • 12
6
votes
2 answers

How to silently broadcast a warning from a cronjob via "wall"?

So I have this cronjob on an Ubuntu 16.04 machine that ends in if ... echo "warning" | wall 2>&1 > /dev/null fi that I use to warn all users about some action taking place. Although I redirect its output to /dev/null, the script somehow manages…
Pavel
  • 988
  • 1
  • 8
  • 29
6
votes
4 answers

Can't send commands via SSH to Juniper firewalls

I have some Juniper SSG firewalls which I need to manage, and I'd like to be able to send commands to them from some monitoring scripts. I configured SSH access using public keys, and I'm able to automatically login to the firewalls. When I run SSH…
Massimo
  • 68,714
  • 56
  • 196
  • 319
5
votes
1 answer

ttylog attaches to the wrong process - release notes a bit hard to understand too

I have a lengthy python script running on a machine: [root@server1]# ps aux | grep python root 30640 15.6 0.6 296416 102444 pts/4 S+ 11:29 2:38 python my_script.py But I'm now working remotely on my laptop and want to view the output of…
5
votes
1 answer

pam_tty_audit and non privileged users

I'm working on a cents 6.3 box and am trying to log all commands executed from a bash shell and came across pam_tty_audit. I've added the appropriate line to my /etc/pam.d/system-auth file: session required pam_tty_audit.so enable=* The…
Jeff
  • 51
  • 2
5
votes
1 answer

Need a replacement for "Snoopy"

Currently, we use Snoopy to monitor all commands issued by users on some externally accessible servers. We're in the process of updating everything to RHEL8 to ensure supportability and compliance, and discovered that my beloved Snoopy is no longer…
Egyas
  • 121
  • 1
  • 10
4
votes
2 answers

How to tell whether a serial connection is "established"?

We have a Debian-based embedded device. It runs an application that communicates with other embedded equipment via serial (RS-232, /dev/ttyS*). Usually, this works just fine. But of course, sometimes things go wrong and while our app can still send…
Nils Toedtmann
  • 3,202
  • 5
  • 25
  • 36
4
votes
2 answers

restrict ssh to run commands for some users

I have a machine where only some users should be allowed to login and execute commands over ssh, rest all users can ssh and run commands but should not login i.e no tty for other users. Can someone help me with this.
piro
  • 41
  • 2
3
votes
2 answers

Unable to run Expect " no more ptys. " as normal user

I have an LXC container with CentOS 7.4 running. On running expect from Normal user I am getting the below error. user@server ~> expect -c "spawn ls" spawn ls The system has no more ptys. Ask your system administrator to create more. while…
nirmalraj17
  • 203
  • 4
  • 13
3
votes
2 answers

agetty is constantly terminated

I'm trying to set up serial console on CentOS 6.2. I've been able to get a login console, but if I try to enable grub and the kernel log showing on the serial port, grub keeps being terminated every few seconds. This is my current…
Ovesh
  • 175
  • 1
  • 3
  • 12
1
2 3 4 5