美文网首页
ssh 远程登录问题

ssh 远程登录问题

作者: dhz120 | 来源:发表于2023-05-16 14:07 被阅读0次

测试环境:ubuntu20.04

1. 远程ssh不显示颜色解决方法

修改~/.bashrc, 使变量force_color_prompt=yes存在, 修改成功后执行source ~/.bashrc使配置文件生效

#force_color_prompt=yes
force_color_prompt=yes

2. ssh连入linux服务器~/.bashrc不执行的方法

在~/.bash_profile文件内添加以下脚本,并执行 source ~/.bash_profile。

# if running bash  
if [ -n "$BASH_VERSION" ]; then  
    # include .bashrc if it exists  
    if [ -f "$HOME/.bashrc" ]; then  
        . "$HOME/.bashrc"  
    fi  
fi  

相关文章

网友评论

      本文标题:ssh 远程登录问题

      本文链接:https://www.haomeiwen.com/subject/ehcbsdtx.html