Getting unwanted characters when reading command output from SSH server using JSch

后端 未结 2 730
一生所求
一生所求 2020-12-06 20:23

I am connecting to the remote server SSH server and trying to get get the list of files in a particular path I am able to get list of files in the path but they were in unre

2条回答
  •  旧巷少年郎
    2020-12-06 20:58

    After creating the channel, you can set the pseudo terminal type as "dumb"

    ChannelShell channel = (ChannelShell) session.openChannel("shell");
    channel.setPtyType("dumb");
    

提交回复
热议问题