TerminalStudio / dartssh2

SSH and SFTP client written in pure Dart, aiming to be feature-rich as well as easy to use.
https://pub.dev/packages/dartssh2
MIT License
212 stars 56 forks source link

ssh设置环境变量会导致start pty fail #102

Open itzhoujun opened 4 months ago

itzhoujun commented 4 months ago
    final session = await client.shell(
      pty: SSHPtyConfig(
        width: terminal.viewWidth,
        height: terminal.viewHeight,
      ),
      environment: {"NEWBBY": "1"}
    );

image

itzhoujun commented 4 months ago

进展:经过排查发现,不是start pty失败,而是send env失败。由于send env没有await等待reply结果,导致send env的reply被误认为是start pty的失败。实际上pty是可以成功的,失败的是send env