2017-04-13 232 views
-2

我在过去使用mac上的终端访问SSH到我的网站。但是,每次尝试打开终端时,我都会自动登录。而且我无法注销/退出以使用终端。它总是“在壳内”。从终端MAC终止SSH

当我尝试“退出”或“注销”或“ctrl + d”时,它会注销并出现“[已完成处理]”。但是,我无法使用终端,按任何键时都不会发生任何事情。

所以我退出终端并重新启动它,然后我回到原点,登录到SSH。我想使用终端应用程序。

回答

0

通过您登录到服务器时,可以通过执行获得tty PID。

PS EF

就用杀,等等;

杀-9 PID

这会杀了你和服务器的连接。

0

我从来没有测试过,但通过快速搜索,我发现了两篇文章,first articlesecond article

第一篇文章提到关于别名(这是ssh登录而不使用密码到远​​程服务器)。您可以尝试检查您的.bashrc文件中是否创建了别名,如果它有,则将其删除。

第二篇文章提到改变你的终端行为,这很可能是你的情况。文章提到你可以检查你的默认shell路径。

步骤来检查你的shell路径:

- Go to terminal and open preferences 
- Under General tab, you will see 'Shells open with' 
- If it is under default then you might want to check '/usr/bin/login' and '/bin/bash', if there is anything that run the above alias and remove it if there is. 
- If it is under Command(complete path), then you might want to check the path, if there is anything that run the above alias and remove it if there is. 

我再说一遍,我没有测试过这个,因为我没有这个问题,但我希望这将帮助您解决您的问题。祝你今天愉快。

+0

是啊读过它们,但那些没有帮助。我也尝试过“shell打开”,但我仍然登录到shell。我不知道这个东西。我遵循指导如何连接到我的网站从它下载文件。现在我卡在那里:S –