[英]ssh -T hanging when trying to access an AWS EC2 instance
I have an AWS EC2 instance and I can ssh into it fine, but I want to use ssh -T so that my keys are shared for github access and so on, but ssh -T hangs after login.我有一个 AWS EC2 实例,我可以 ssh 进入它,但我想使用 ssh -T 以便我的密钥共享 github 访问等等,但 ssh -T 在登录后挂起。
Has anyone experienced this or any ideas about how to fix?有没有人经历过这个或关于如何解决的任何想法?
One thing I have done is stick verbose mode in.bashrc and it seems to get stuck after this output我做过的一件事是在 .bashrc 中坚持详细模式,它似乎在这个 output 之后卡住了
+ export -f module
+ export -f switchml
+ '[' 5 -ge 3 ']'
+ [[ hxB =~ i ]]
+ [[ ! :/usr/local/cuda/bin:/opt/amazon/openmpi/bin/:/opt/amazon/efa/bin/:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: =~ :/usr/bin: ]]
+ '[' '!' -n x ']'
++ manpath
+ [[ ! :/usr/local/man:/usr/local/share/man:/usr/share/man:: =~ :/usr/share/man: ]]
+ unset _mlcode _mlret
+ '[' -n '' ']'
one thing I notice is that with -T
the $PS1 appears to be different and so the first line of the bashrc file sources an additional file:我注意到的一件事是,使用
-T
时 $PS1 似乎有所不同,因此 bashrc 文件的第一行提供了一个附加文件:
[ -z "$PS1" ] && source /etc/profile.d/dlami.sh
but I'm not really sure how that's all related...但我不太确定这一切有什么关系……
okay, so this was all a confusion about ssh flags - should have been ssh -a
好的,所以这是关于 ssh 标志的所有混淆 - 应该是
ssh -a
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.