예제 #1
0
        public override void start()
        {
            try
            {
                Request request;

                if (xforwading)
                {
                    request = new RequestX11();
                    request.request(session, this);
                }

                if (pty)
                {
                    request = new RequestPtyReq();
                    request.request(session, this);
                }

                request = new RequestExec(command);
                request.request(session, this);
            }
            catch (Exception)
            {
                throw new JSchException("ChannelExec");
            }
            thread = new JavaThread(this);
            thread.Name("Exec thread " + session.getHost());
            thread.Start();
        }
예제 #2
0
 public override void start()
 {
     try
     {
         Request request;
         if (xforwading)
         {
             request = new RequestX11();
             request.request(session, this);
         }
         if (pty)
         {
             request = new RequestPtyReq();
             request.request(session, this);
         }
         request = new RequestShell();
         request.request(session, this);
     }
     catch //(System.Exception e)
     {
         throw new JSchException("ChannelShell");
     }
     thread = new JavaThread(this);
     thread.Name("Shell for " + session.host);
     thread.Start();
 }
예제 #3
0
        public override void start()
        {
            try
            {
                Request request;
                if (xforwading)
                {
                    request = new RequestX11();
                    request.request(session, this);
                }
                if (pty)
                {
                    request = new RequestPtyReq();
                    request.request(session, this);
                }
                request = new RequestSubsystem();
                ((RequestSubsystem)request).request(session, this, subsystem, want_reply);
            }
            catch (Exception e)
            {
                if (e is JSchException)
                {
                    throw (JSchException)e;
                }
                throw new JSchException("ChannelSubsystem");
            }
            JavaThread thread = new JavaThread(this);

            thread.Name("Subsystem for " + session.host);
            thread.Start();
        }