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

【功能建议】通过跳板机登录到服务器后SecureCRT显示框无法显示IP #2875

Open
liyingxiao94 opened this issue Jul 3, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@liyingxiao94
Copy link

commented Jul 3, 2019

[简述你的问题]
通过跳板机登录多个服务器,类似于SecureCRT的远程终端连接工具无法显示相应登录的服务器IP,因此容易造成混乱,不利于操作人员操作相应的服务器

使用版本

[请提供你使用的Jumpserver版本 1.x.x 注: 0.3.x不再提供支持]
1.5.0

问题复现步骤
  1. [步骤1]
  2. [步骤2]
具体表现[截图可能会更好些,最好能截全]

image

其他

[注:] 完成后请关闭 issue

@Jackxun123

This comment has been minimized.

Copy link

commented Jul 8, 2019

修改coco下的coco/connection.py,
添加
ssh.exec_command('echo "echo -ne \\"\e]2;'+asset.hostname+'\\a\\"" > /etc/sysconfig/bash-prompt-xterm && chmod +x /etc/sysconfig/bash-prompt-xterm && echo "PS1=\\"[\\u@'+asset.hostname+'-'+asset.ip+' \\W]\\$\\"" > /etc/profile.d/changePS1.sh && chmod +x /etc/profile.d/changePS1.sh')

如图

pic

效果如图

1pic

@liyingxiao94

This comment has been minimized.

Copy link
Author

commented Jul 8, 2019

感谢支持,我尝试修改了coco下的/opt/coco/coco/connection.py
image
重启docker容器后登陆发现无法达到你的效果,我理解这个是把服务器的命令行提示符但是没有生效,也没有重定向成功哪个文件生成。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.