trzsz / trzsz-ssh

trzsz-ssh ( tssh ) is an ssh client designed as a drop-in replacement for the openssh client. It aims to provide complete compatibility with openssh, mirroring all its features, while also offering additional useful features. Such as login prompt, batch login, remember password, automated interaction, trzsz, zmodem(rz/sz), udp mode like mosh, etc.
https://trzsz.github.io/ssh
MIT License
1.68k stars 100 forks source link

UDP模式支持ForwardAgent不成功 #128

Closed lifei closed 2 months ago

lifei commented 2 months ago

debug日志有提到👇

debug: request ssh agent forwarding success

进入终端后发现👇

> env | grep SSH
TRZSZ-SSHD-BACKGROUND=TRUE
SSH_CONNECTION=192.168.196.229 57648 192.168.196.114 22
SSH_CLIENT=192.168.196.229 57648 22
SSH_TTY=/dev/pts/2

tmp目录下也没有sock文件👇

> ls -a /tmp/ -l
total 64
drwxrwxrwt 17 root  root  4096 Jul 18 03:51 ./
drwxr-xr-x 19 root  root  4096 Jun 11  2010 ../
drwxrwxrwt  2 root  root  4096 Jul 15 12:57 .ICE-unix/
drwxrwxrwt  2 root  root  4096 Jul 15 12:57 .Test-unix/
drwxrwxrwt  2 root  root  4096 Jul 15 12:57 .X11-unix/
drwxrwxrwt  2 root  root  4096 Jul 15 12:57 .XIM-unix/
drwxrwxrwt  2 root  root  4096 Jul 15 12:57 .font-unix/
lonnywong commented 2 months ago

有没有 Warning ?

lifei commented 2 months ago

有没有 Warning ?

没。

debug: login to [t001] success
debug: no extended config [UdpMode] for [t001]
debug: no extended config [TsshdPath] for [t001]
debug: tsshd command: tsshd
debug: get extended config [UdpAliveTimeout] for [t001] success
debug: udp login [t001] success
debug: request ssh agent forwarding success
debug: send env regexp: (^LANG$)|(^LC_.*$)
debug: send env success: LANG = "en_US.UTF-8"
debug: no extended config [ExpectCount] for [t001]
debug: no extended config [EnableTrzsz] for [t001]
debug: no extended config [EnableZmodem] for [t001]
debug: no extended config [EnableDragFile] for [t001]
debug: get extended config [EnableOSC52] for [t001] success
debug: no extended config [DragFileUploadCommand] for [t001]
lonnywong commented 2 months ago

服务器端 tsshd 是什么版本?

lifei commented 2 months ago

服务器端 tsshd 是什么版本?

main版本

lonnywong commented 2 months ago

tsshd -v 显示的是 0.1.2 吗?

lifei commented 2 months ago

好像是0.1.1,升级后OK了……

PS:提个需求,加一个自动安装tsshd并升级的功能。

lonnywong commented 2 months ago

PS:提个需求,加一个自动安装tsshd并升级的功能。

已支持。

可以 tssh --install-tsshd 这样运行,然后就按空格 选择多台服务器进行安装,快捷键参考 README

也可以指定在某台服务器上安装 tssh --install-tsshd xxx_server

会自动从 GitHub 上获取 tsshd 最新的版本,然后下载适当的二进制,并上传到 ~/.local/bin/ 目录中。

如果获取 tsshd 版本号失败,可以手工指定,如 tssh --install-tsshd --tsshd-version 0.1.2

如果下载 tsshd 二进制失败,也可以手工指定,如 tssh --install-tsshd --tsshd-bin-path /path/to/xxx.tar.gz

v0.1.22 发布前,可以这样安装 go install github.com/trzsz/trzsz-ssh/cmd/tssh@main ,安装的路径在 ~/go/bin/