当前位置: 首页 > 工具软件 > dropbear > 使用案例 >

Dropbear替代Openssh-ssh client使用

叶经略
2023-12-01

替代纯属无奈之举,本来安装了一个Manjaro Linux桌面版本尝鲜,但在使用其ssh远程访问其他服务器和网络设备时发现失败报错,重装了openssh,问题依然存在

选择Dropbear替代方案

Dropbear SSH

https://matt.ucc.asn.au/dropbear/dropbear.html

安装就不细说了,在Manjaro上直接使用pamac安装,十分简单

测试

dropbear分为server和client,这里只测试client


dbclient #通过此命令远程访问
Dropbear SSH client v2019.78 https://matt.ucc.asn.au/dropbear/dropbear.html
Usage: dbclient [options] [user@]host[/port][,[user@]host/port],...] [command]
-p <remoteport>
-l <username>
-t    Allocate a pty
-T    Don't allocate a pty
-N    Don't run a remote command
-f    Run in background after auth
-y    Always accept remote host key if unknown
-y -y Don't perform any remote host key checking (caution)
-s    Request a subsystem (use by external sftp)
-o option     Set option in OpenSSH-like format ('-o help' to list options)
-i <identityfile>   (multiple allowed, default .ssh/id_dropbear)
-A    Enable agent auth forwarding
-L <[listenaddress:]listenport:remotehost:remoteport> Local port forwarding
-g    Allow remote hosts to connect to forwarded ports
-R <[listenaddress:]listenport:remotehost:remoteport> Remote port forwarding
-W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
-K <keepalive>  (0 is never, default 0)
-I <idle_timeout>  (0 is never, default 0)
-B <endhost:endport> Netcat-alike forwarding
-J <proxy_program> Use program pipe rather than TCP connection
-c <cipher list> Specify preferred ciphers ('-c help' to list options)
-m <MAC list> Specify preferred MACs for packet verification (or '-m help')
-b    [bind_address][:bind_port]
-V    Version

例如


dbclient cc@10.101.3.100

Host '10.101.3.100' is not in the trusted hosts file.
(ecdsa-sha2-nistp256 fingerprint sha1!! bd:fe:f6:cd:91:a9:00:df:27:a6:68:bf:72:aa:05:ab:a8:86:d5:ab)
Do you want to continue connecting? (y/n) y
cc@10.101.3.100's password: 
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-62-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

253 packages can be updated.
164 updates are security updates.

New release '18.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Mon Jul 15 17:40:24 2019 from 10.x.x.x


下面是令人无语的SSH报错问题,没有找到解决方法


ssh -v cc@10.101.3.100
OpenSSH_8.0p1, OpenSSL 1.1.1c  28 May 2019
debug1: Reading configuration data /home/sj/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 10.101.3.100 [10.101.3.100] port 22.
debug1: Connection established.
debug1: identity file /home/sj/.ssh/id_rsa type -1
debug1: identity file /home/sj/.ssh/id_rsa-cert type -1
debug1: identity file /home/sj/.ssh/id_dsa type -1
debug1: identity file /home/sj/.ssh/id_dsa-cert type -1
debug1: identity file /home/sj/.ssh/id_ecdsa type -1
debug1: identity file /home/sj/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/sj/.ssh/id_ed25519 type -1
debug1: identity file /home/sj/.ssh/id_ed25519-cert type -1
debug1: identity file /home/sj/.ssh/id_xmss type -1
debug1: identity file /home/sj/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.0
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to 10.101.3.100:22 as 'cc'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:KEOXDXc6jPi/xf3aGs28La3JG7krwmSC8+GjdZTl2CA
debug1: Host '10.101.3.100' is known and matches the ECDSA host key.
debug1: Found key in /home/sj/.ssh/known_hosts:3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/sj/.ssh/id_rsa 
debug1: Will attempt key: /home/sj/.ssh/id_dsa 
debug1: Will attempt key: /home/sj/.ssh/id_ecdsa 
debug1: Will attempt key: /home/sj/.ssh/id_ed25519 
debug1: Will attempt key: /home/sj/.ssh/id_xmss 
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/sj/.ssh/id_rsa
debug1: Trying private key: /home/sj/.ssh/id_dsa
debug1: Trying private key: /home/sj/.ssh/id_ecdsa
debug1: Trying private key: /home/sj/.ssh/id_ed25519
debug1: Trying private key: /home/sj/.ssh/id_xmss
debug1: Next authentication method: password
cc@10.101.3.100's password: 
debug1: Authentication succeeded (password).
Authenticated to 10.101.3.100([10.101.3.100]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
client_loop: send disconnect: Broken pipe


 类似资料: