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

在使用exec fish登陆自动加载交互式shell(fish)时,无法连接到服务器 #572

Open
vybfi opened this issue Sep 4, 2024 · 11 comments

Comments

@vybfi
Copy link

vybfi commented Sep 4, 2024

描述BUG

在使用exec fish登陆自动加载交互式shell(fish)时,无法通过APP连接到服务器。经过反复测试,与APP设置无关,仅和服务器设置有关。使用其他ssh软件可以正常登录并使用。

复现步骤
如何复现:

  1. 在linux中安装fish 。
  2. 在“/etc/bash.bashrc”中添加exec fish 来自动切换shell为fish。
  3. 在app中按照正常步骤添加服务器。
  4. 无法登陆,看到错误

期望结果

应当正常连接

实际结果

显示查看错误,无法连接到服务器

截图

image

设备

系统: ios17.5.1
App版本:1.0.1070

更多信息

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Unable to connect to the server when using exec fish to log in to automatically load the interactive shell (fish)

DESCRIPTION BUG

When using exec fish to log in to automatically load the interactive shell (fish), you cannot connect to the server through the APP. After repeated testing, it has nothing to do with the APP settings, only the server settings. You can log in and use it normally using other ssh software.

Steps to reproduce
How to reproduce:

  1. Install fish in linux.
  2. Add exec fish in "/etc/bash.bashrc" to automatically switch the shell to fish.
  3. Follow the normal steps in the app to add a server.
  4. Unable to log in, see error

Expected results

Should connect normally

Actual results

Display error, unable to connect to server

screenshot

image

equipment

System: ios17.5.1
App version: 1.0.1070

More information

@lollipopkit
Copy link
Owner

不懂为什么

推荐 chsh -s /usr/bin/fish,虽然 exec fish 是直接切换进程到 fish,但仍然会先初始化 bash

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Don't know why

It is recommended to chsh -s /usr/bin/fish. Although exec fish directly switches the process to fish, bash will still be initialized first.

@luodeb
Copy link

luodeb commented Oct 16, 2024

应该是你自己的问题,我在我的服务器上测试是没有问题的,可以正常启动fish,但我不是root用户,也许是root的ssh登录有白名单?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It should be your own problem. I tested it on my server and there was no problem. I can start fish normally, but I am not a root user. Maybe there is a whitelist for root's ssh login?

@vybfi
Copy link
Author

vybfi commented Oct 19, 2024

不懂为什么

推荐 chsh -s /usr/bin/fish,虽然 exec fish 是直接切换进程到 fish,但仍然会先初始化 bash

不使用chsh -s /usr/bin/fish的原因是fish shell并不完全兼容bash,如果不先初始化bash,有些依赖于此的程序会出问题。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Don't understand why

It is recommended to chsh -s /usr/bin/fish. Although exec fish directly switches the process to fish, bash will still be initialized first.

The reason for not using chsh -s /usr/bin/fish is that the fish shell is not fully compatible with bash. If bash is not initialized first, some programs that rely on it will have problems.

@vybfi
Copy link
Author

vybfi commented Oct 19, 2024

应该是你自己的问题,我在我的服务器上测试是没有问题的,可以正常启动fish,但我不是root用户,也许是root的ssh登录有白名单?

请问能说明一下你的测试环境和测试的流程吗,我试试看能不能复现。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It should be your own problem. I tested it on my server and there was no problem. I can start fish normally, but I am not a root user. Maybe there is a whitelist for root's SSH login?

Could you please explain your testing environment and testing process? I'll try to see if I can reproduce it.

@luodeb
Copy link

luodeb commented Oct 19, 2024

应该是你自己的问题,我在我的服务器上测试是没有问题的,可以正常启动fish,但我不是root用户,也许是root的ssh登录有白名单?

请问能说明一下你的测试环境和测试的流程吗,我试试看能不能复现。

我就Ubuntu x86,在~/.bashrc中添加exec fish,可以正常进入fish

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It should be your own problem. I tested it on my server and there was no problem. I can start fish normally, but I am not a root user. Maybe there is a whitelist for root's SSH login?

Could you please explain your testing environment and testing process? I’ll try to see if I can reproduce it.

I use Ubuntu x86, add exec fish in ~/.bashrc, and I can enter fish normally.

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

4 participants