Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一些场景下可能没HOME变量,需要手动指定 #50

Closed
LazyMaple opened this issue Oct 23, 2023 · 2 comments
Closed

一些场景下可能没HOME变量,需要手动指定 #50

LazyMaple opened this issue Oct 23, 2023 · 2 comments

Comments

@LazyMaple
Copy link

最新功能支持参数了,很棒,感谢大佬
然后我使用的时候发现一点小问题,

参数命令如下
./tssh -F xx.conf hosname "pwd"

报错 user home dir failed: $HOME is not defined
解决就是赋值一下HOME HOME=/opt/xxx ./tssh -F xx.conf hosname "pwd"
// 其实这个没有home变量的时候我可能觉得直接取当前路径做默认值好点

另外KnownHosts参数有计划可以通过配置文件配置么,比如有的时候不想记录或者用的是一个不在.ssh目录下的的文件 UserKnownHostsFile=/dev/null,现在指定HOME目录了还要再创建.ssh目录,可能这种场景下其实不需要.ssh目录了,因为多半不想把记录写到~/.ssh/这里去

一点愚见,感谢大佬

@lonnywong
Copy link
Member

我抽空研究下

lonnywong added a commit that referenced this issue Oct 29, 2023
UserKnownHostsFile
GlobalKnownHostsFile
@lonnywong
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants