天行健,君子以自强不息;
      地势坤,君子以厚德载物;

预览模式: 普通 | 列表

美签面签流水回忆录

OpenSSH 7.0 disables ssh-dss keys by default

error:

ssh -v 1.1.1.1

debug1: Skipping ssh-dss key /Users/xxx/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes 

Starting with the 7.0 release of OpenSSH, support for ssh-dss keys has

been disabled by default at runtime due to their inherit weakness.  If

you rely on these key types, you will have to

[阅读全文]

标签: SSH

sed 中如何替换换行符

使用如下解决方案:

sed ':a;N;$!ba;s/n/,/g'
(/n/ n前面有反斜杠,安全机制过滤了) 
这将在一个循环里读取整个文件,然后将换行符替换成一个空格。

说明:

1、通过 :a创建一个标记
2、通过N追加当前行和下一行到模式区域
3、如果处于最后一行前,跳转到之前的标记处。 $!ba ($! 意思是不在最后一行做这操作 (最后一行就被当成最后的一行)).
4、最后置换操作把模式区域(就是整个文件)的每一个换行符换成一个空格。

示例追加:
$ echo -e "1 2" | sed ':a;N;$!ba;s/n/,/g'
(/n/ n前

[阅读全文]

标签: sed

人生马拉松

人生马拉松

人生第一次马拉松,在艰苦状态下完赛,3公里腹痛,近30公里大小腿同时抽筋,几近不能完赛,在意志力作用下,终于坚持了下来,感觉后面的10几公里,拼的不仅仅是体能,更多的是毅力。今年成绩不理想,期望明年有更好的发挥。同时也祝贺所有完赛的小伙伴以及勇于参与的小伙伴。 

 
 

sudo: timestamp too far in the future问题解决

今天出现下面的错误,但是系统的当前时间 是对的
$ sudo -i
sudo: timestamp too far in the future: Apr 27 11:47:31 2026;

解决如下:
method 1: 
========= 
I was able to get around this by doing the following: 

1. Check the timestamp sudo reports (will look something like below). 
sudo: timestamp too far in the futu

[阅读全文]