Where does the "prompt come from"

From: Niclas Bäckman (niclas.c.backman_at_ericsson.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 14:45:53 +0100

Hi All !
I have a little question about the shell that is run when establishing a
connection towards an SSH server.
The client(OpenSSH) displays a prompt(as usual) when a command is executed,
but my question is, where does the prompt come from.
Is it sent by the remote shell or is it handled in the client ??

The reason I ask is that we have developed a product that redirects
stdin/stdout/stderr from the ssh binary to a socket, and we then
perform socket read/writes directly into the ssh tunnel. But when i perform
a command, the prompt is never read up from the server.
So it's difficult to know when a remote script is finished. Using the same
solution but towards a telnet server always results in a prompt
back to the client.

I would be most greatful for any good ideas/hints in this case.

Thanks in advance !!
/Niclas Bäckman, Ericsson AB



Relevant Pages

  • Re: Is ssh not safe?
    ... The issue here is trust in your "local" users, not ssh itself. ... the attacker be logged in with shell access. ... you can afford to ignore these kinds of vulnerabilities and reduce ... https, it protects your users, not the server itself. ...
    (Fedora)
  • Re: Did you hack into my UNIX server Bible Bob?
    ... try "traceroute" to see if the routes to your server are up. ... yet allow me to FTP and ssh in? ... firewall rules to block everything except for SSH traffic from one ... But that's not a shell question. ...
    (comp.unix.shell)
  • Re: Putty: PSFTP connection without password prompt (CORRECT VERSION)
    ... you are sending files to a server running SSH ... SSH server. ... 'rssh' as the default user shell so that user cannot SSH into the ... > (I partially hidden some parts for security reasons). ...
    (comp.security.ssh)
  • Re: Ssh problem
    ... when I ssh from one machine to another (both RedHat ... > return after exiting from the remote shell. ... process on the server side and try to exit, ...
    (RedHat)
  • Re: ssh X11forwarding wont work, please help
    ... whereas saying "export DISPLAY made me think "the display server". ... set by ssh, the shell freezes after i start an x application. ... rules and the X Server at machine1 is listening for TCP connections. ...
    (comp.os.linux.x)