53

Linux异常集锦

 5 years ago
source link: http://whatbeg.com/2019/04/16/linuxexceptions.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
a9:31:72:45:8d:fb:13:57:85:cc:0a:1c:56:33:c6:04.
Please contact your system administrator.
Add correct host key in /home/experiment/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/experiment/.ssh/known_hosts:14
ECDSA host key for slave103 has changed and you have requested strict checking.
Host key verification failed.

【解决方案】将 /home/experiment/.ssh/known_hosts 对应行删掉。因为可能host key已经更新了。

scp时,-bash: syntax error near unexpected token ‘(‘

scp/rsync远程传输时,如果文件名包含括号’(‘或’)’,则简单的传输会报错,如下:

$ scp remote01:./xx/haha(2019).lcv .
-bash: syntax error near unexpected token `('

如果简单加上转义符’\’或者引号’’,也会报错:

$ scp remote01:./xx/haha\(2019\).lcv .
或者
$ scp remote01:./xx/haha"(2019)".lcv .

bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `scp -f ./huqiu/das/benchmarks/lcvs/slave028_aeh_adult_r0_trial_500_P_100_S_1_TL_360_04061553(0.874701).lcv'

这时候,其实是加少了,因为涉及到本地端和remote端,所以需要提供可供两次转义还正确的写法。

【解决方案】

$ scp 'remote01:./xx/haha\(2019\).lcv' .
或者
$ scp remote01:./xx/haha"\(2019\)".lcv .
或者
$ scp remote01:./xx/haha\\\(2019\\\).lcv .

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK