ເປີດໃຊ້ ໂໝດ Debugging ໃນ SSH ເພື່ອແກ້ໄຂບັນຫາການເຊື່ອມຕໍ່


ໃນບົດຄວາມນີ້, ພວກເຮົາຈະສະແດງວິທີການເປີດ ໂໝດ debugging ໃນຂະນະທີ່ໃຊ້ SSH ໃນ Linux. ນີ້ຈະຊ່ວຍໃຫ້ທ່ານເຫັນສິ່ງທີ່ເປີດເຜີຍຕົວຈິງໃນເວລາທີ່ທ່ານປະຕິບັດຄໍາສັ່ງ ssh ເພື່ອເຊື່ອມຕໍ່ກັບ server Linux ຫ່າງໄກສອກຫຼີກໂດຍໃຊ້ໂຫມດ verbose ຫຼືໂຫມດ debugging.

ຕົວປ່ຽນລະຫັດຂອງລູກຄ້າ ssh ເຮັດໃຫ້ທ່ານສາມາດເອີ້ນໃຊ້ ssh ໃນ ໂໝດ verbose, ເຊິ່ງພິມຂໍ້ມູນການແກ້ໄຂບັນຫາກ່ຽວກັບຄວາມຄືບ ໜ້າ ຂອງການເຊື່ອມຕໍ່ SSH, ເຊິ່ງມັນມີປະໂຫຍດຫຼາຍ ສຳ ລັບການເຊື່ອມຕໍ່ debugging, ການກວດສອບຄວາມຖືກຕ້ອງແລະບັນຫາການຕັ້ງຄ່າຕ່າງໆ. ມີລະດັບຄວາມເວົ້າແຕກຕ່າງກັນ; ການໃຊ້ທຸງຫຼາຍຕົວ -v ເພີ່ມຂື້ນໃນລະດັບການປາກເວົ້າ (ລະດັບຄວາມສູງສຸດແມ່ນ 3).

ຄຳ ສັ່ງຕໍ່ໄປນີ້ຈະເຮັດວຽກ SSH ໃນລະດັບ ທຳ ອິດຂອງການ verbosity, ເຊິ່ງເຮັດໃຫ້ພວກເຮົາມີຂໍ້ມູນການແກ້ໄຂຫຼາຍຢ່າງດັ່ງທີ່ສະແດງໄວ້.

[email  ~ $ ssh -v [email 
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g-fips  1 Mar 2016
debug1: Reading configuration data /home/aaronkilik/.ssh/config
debug1: /home/aaronkilik/.ssh/config line 18: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.56.10 [192.168.56.10] port 22.
debug1: Connection established.
debug1: identity file /home/aaronkilik/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/aaronkilik/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.56.10:22 as 'tecmint'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email 
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email  MAC:  compression: [email 
debug1: kex: client->server cipher: [email  MAC:  compression: [email 
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:1778erqyug4tHJa7D6y/Ep4UWsUtNEOBSMaj32k9oO8
debug1: Host '192.168.56.10' is known and matches the ECDSA host key.
debug1: Found key in /home/aaronkilik/.ssh/known_hosts:8
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/aaronkilik/.ssh/id_rsa
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.56.10 ([192.168.56.10]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email 
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email  want_reply 0
debug1: Sending environment.
debug1: Sending env LC_PAPER = lg_UG.UTF-8
debug1: Sending env LC_ADDRESS = lg_UG.UTF-8
debug1: Sending env LC_MONETARY = lg_UG.UTF-8
debug1: Sending env LC_NUMERIC = lg_UG.UTF-8
debug1: Sending env LC_TELEPHONE = lg_UG.UTF-8
debug1: Sending env LC_IDENTIFICATION = lg_UG.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_MEASUREMENT = lg_UG.UTF-8
debug1: Sending env LC_NAME = lg_UG.UTF-8
Last login: Sat Jan  6 16:20:11 2018 from 192.168.56.1

ເມື່ອພະຍາຍາມອອກຈາກລະບົບຫລືອອກຈາກການປະຊຸມ, ທ່ານຍັງຈະເຫັນຂໍ້ຄວາມແກ້ໄຂຜິດພາດດັ່ງທີ່ສະແດງໄວ້.

[[email  ~]$ exit

logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email  reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to 192.168.56.10 closed.
Transferred: sent 3392, received 3120 bytes, in 118.1 seconds
Bytes per second: sent 28.7, received 26.4
debug1: Exit status 0
debug1: compress outgoing: raw data 1159, compressed 573, factor 0.49
debug1: compress incoming: raw data 573, compressed 1159, factor 2.02

ຕໍ່ໄປ, ທ່ານສາມາດເປີດໃຊ້ ຄຳ ເວົ້າຕື່ມອີກ (ລະດັບ 2 ແລະ 3) ສຳ ລັບຂໍ້ຄວາມທີ່ມີການ ກຳ ຈັດຫຼາຍຂື້ນດັ່ງທີ່ສະແດງໄວ້.

$ ssh -vv [email 
$ ssh -vvv [email 

ນັ້ນແມ່ນມັນ! ສໍາລັບການນໍາໃຊ້ຫຼາຍຂອງ SSH, ອ່ານບົດຄວາມທີ່ກ່ຽວຂ້ອງຕໍ່ໄປນີ້.

<

  • ວິທີການຊອກຫາຄວາມພະຍາຍາມເຂົ້າສູ່ລະບົບ SSH ທີ່ລົ້ມເຫລວໃນ Linux
  • ວິທີການປິດການເຂົ້າໃຊ້ລະບົບຮາກ SSH ໃນ Linux
  • ການເຂົ້າລະຫັດແບບບໍ່ມີລະຫັດ SSH ໂດຍໃຊ້ SSH Keygen ໃນ 5 ຂັ້ນຕອນງ່າຍໆ
  • ວິທີການຕັດການເຊື່ອມຕໍ່ທີ່ບໍ່ມີປະສິດຕິພາບຫຼືບໍ່ເຮັດວຽກ SSH ໃນ Linux
  • ພວກເຮົາຫວັງວ່າທ່ານຈະເຫັນວ່າບົດຂຽນນີ້ມີປະໂຫຍດ. ທ່ານສາມາດຖາມ ຄຳ ຖາມຫຼືແລກປ່ຽນຄວາມຄິດເຫັນຜ່ານແບບຟອມ ຄຳ ເຫັນຂ້າງລຸ່ມນີ້.