ssh daemon question

This is a discussion on ssh daemon question within the Linux Programming forums, part of the Platform Specific Boards category; I'm not that sure if I should post this question here or the tech forum. .... Someone told me that ...

  1. #1
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329

    ssh daemon question

    I'm not that sure if I should post this question here or the tech forum. ....


    Someone told me that an interactive ssh session works like the following

    When you do an interactive SSH login, stdin and stdout are connected to
    a pseudo-tty, which is connected to sshd on the server, which is
    connected to the TCP socket, which is connected to the ssh client.

    Now let's say that I have a remote application chatroom application called party on this server and I invoked it from my machine like the following

    ssh -t cd@someserver.com party
    Here is my question. Would the party program get called before the sshd on the server connects to the TCP socket or after?
    Last edited by Overworked_PhD; 07-07-2009 at 10:30 AM.

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,274
    Quote Originally Posted by Overworked_PhD View Post
    Here is my question. Would the party program get called before the sshd on the server connects to the TCP socket or after?
    How could it possibly get called before? Does the ssh server have the ability to predict the future? How would it even know which program should be executed unless the client tell it, and how could the client tell it without being connected?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    If I'm understanding your question correctly (and if I understand the ssh man page correctly), the answer to your question is AFTER.

    ssh attempts to connect to the remote machine on a socket. Next, your credentials are transmitted across that (secured -- by encryption) socket. Finally, the command "party" would be sent.

    Andy

  4. #4
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    How does pseudo terminal connect to the ssh daemon without first connecting to the TCP socket?

  5. #5
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    It doesn't.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why does the ssh daemon set up two processes?
    By Overworked_PhD in forum Tech Board
    Replies: 2
    Last Post: 09-25-2008, 07:48 PM
  2. SSH tunnel
    By kastrup_carioca in forum C Programming
    Replies: 10
    Last Post: 01-18-2006, 04:29 PM
  3. Daemon problem
    By gandalf_bar in forum Linux Programming
    Replies: 3
    Last Post: 07-20-2004, 07:23 AM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21