ssh 出現 error in libcrypto Connection closed 錯誤訊息

 最近公司的產品OS更換到Alma Linux,因此安裝了一台全新的Alma Linux機器,然後接下來要使用scp去別的主機搬移檔案的時候出現了下面的錯誤訊息 The authenticity of host '10.*.*.68 (10.*.*.68)' can't be established. RSA key fingerprint is SHA256:RKJMaNXf4Fw5I2rjsdiLr17MQn1LTyMurlb6hV2qo18. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '10.*.*.68' (RSA) to the list of known hosts. ssh_dispatch_run_fatal: Connection to 10.*.*.68 port 22: error in libcrypto Connection closed 解決方法是指定加密演算法 update-crypto-policies --set DEFAULT:SHA1

AngularJs , $http 回傳資料不經過JSON解析處理之作法

最近在開發Angularjs架構之介面,資料處理動作完全透過Web Service進行處理,而Angularjs與Server端連接的動作使用$http模組來進行,不過使用之後發現它預設會對於傳輸的資料進行JSON剖析,有些情況Server回傳的資料會包含類似JSON或錯誤的JSON字串,而如果只是要將回傳資料當作純字串處理,這時$http會發生錯誤,要讓$http不做解析動作之方式如下,
在$http設定內加上transformResponse 設定function,並且不做任何事情直接回傳data內容即可。


$http({
    method: 'POST',
    url: '../test/getTest',
    data: 'sql=select * form abc.',
    headers: {'Content-Type': 'application/x-www-form-urlencoded'},
    transformResponse: [function (data) {
     return data;
    }]
   })




留言

這個網誌中的熱門文章

排解Mysql 發生ERROR 2003 (HY000): Can't connect to MySQL server on "host" (111) 無法連線之錯誤

如何使用網路線將Ubuntu與raspberry Pi 對接

Linux -- shell script 取得unix timestamp 並且產出時間字串