Code
SSH: no matching host key type found. Their offer: ssh-rsa
After a recent macOS upgrade, some ssh access was strangely blocked. I turned on verbose logs to check the problem.
After a recent macOS upgrade, some ssh access was strangely blocked. I turned on verbose logs to check the problem.
It is becoming pretty slow in SSH to a CentOS server.
Trying to print a verbose log:
$ ssh -vvvv my-host .... debug3: send packet: type 21 debug2: set_newkeys: mode 1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug3: receive packet: type 21 debug1: SSH2_MSG_NEWKEYS received debug2: set_newkeys: mode 0 debug1: rekey in after 134217728 blocks debug1: Will attempt key: /Users/user/.ssh/id_rsa RSA SHA256:XXXXX/gNY explicit debug2: pubkey_prepare: done debug3: send packet: type 5 debug3: receive packet: type 7 debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512> debug3: receive packet: type 6 debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug3: send packet: type 50 ..... <<<-- long long long silence here debug3: receive packet: type 51 <<<-- and then continue to access the server debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password debug3: preferred publickey,keyboard-interactive,password
SSH Port Forwarding is a mechanism in SSH for tunneling application ports from the client machine to the server machine, or vice versa.
Suppose we wish to visit a port on a remote machine that is behind a firewall; we can use SSH port forwarding to bind that port to our local machine.
一般情况下,我们用rsync可以很容易的同步一个远程目录.
$ rsync -avzh --progress --delete \ name@remote_host:source_dir target_dir
这样就把远程的一个目录同步回来了.
但是现在问题来了,当 port 为非标准的 22 端口时, 我们应该怎样加参数呢?比如有时候我们会 NAT 到 2222 端口.
当前,在做ssh框架,国际化等各种Java项目的时候,常常需要使用到lo4j.properties,en_us.properties 之类,它们是怎么起作用的呢? 找了点资料,尝试了下,发现它装载配置的确挺简单的 (more…)