>> 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
