Not for me to say - I don't know what your intentions are. However:

- If you need to run one command at a time - then use "exec" channel
- If you need to use a "session" where you issue several commands that
somehow interact and/or depend on one another then use "shell" channel

You are right. What shall I do?

-----Original Message-----
From: Lyor Goldstein <[email protected]>
Sent: Sunday, June 16, 2019 6:57 PM
To: [email protected]
Subject: RE: channel request

>> I took this code
https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/ssh/SSHClient.java
that
is using the sshd


The code you  mention runs a single (!) command and then exits. I believe
your original question was about .profile and being able to maintain a
session state. If I am mistaken and all you need it so run a single (!)
stateless (!) command then you can use an "exec" channel.

>> I am not using ChannelShell, what is it ?

See https://tools.ietf.org/html/rfc4254#section-6.5
This email and the information contained herein is proprietary and
confidential and subject to the Amdocs Email Terms of Service, which you
may review at https://www.amdocs.com/about/email-terms-of-service <
https://www.amdocs.com/about/email-terms-of-service>

Reply via email to