SSH很快,scp巨慢的问题

不久前遇到一个很诡异的问题,SSH很快,scp巨慢,查了很久没查出根源所在,几乎崩溃。幸好今天tonnyom找到了答案,哈哈,太强大了!!

2.9 - sftp/scp fails at connection, but ssh is OK.
sftp and/or scp may fail at connection time if you have shell initialization (.profile, .bashrc, .cshrc, etc) which produces output for non-interactive sessions. This output confuses the sftp/scp client. You can verify if your shell is doing this by executing:

ssh yourhost /usr/bin/true

If the above command produces any output, then you need to modify your shell initialization.

发现在.bashrc里面因为程序员需要在secureCRT上显示标签,加入了:
echo -ne "/e]2;${USER}@${HOSTNAME}/a"

去掉一切OK。
但是使用secureCRT又需要标签的同志是无法忍受的,因此设置的方法改为:
在/etc/sysconfig/bash-prompt-default里面加入:
echo -ne "/e]2;${USER}@${HOSTNAME}/a"

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值