血的教训--kail系统免密centos7的坑【高版本ssh免密低版本ssh的坑】

血的教训–kail系统免密centos7的坑【高版本ssh免密低版本ssh的坑】

最近下载了一个2023版本的kail系统,但是经过几次设置免密后,ssh过去一直让提供密码,所以就仔细的分析了一下,果然还是发现了点猫腻

接上一个博客,大家可以看看,ssh免密之间的坑
入侵redis之准备—linux之间的免密通信原来是这么的简单

ssh免密其实很简单,但是没想到还是有一些坑
出现免密失败的情况,我也是百度了好多,都是让更改目录的权限,但是都失败了,其实这跟权限有关系,但是我们基本上也不会动这些目录的权限,如果你的权限没有问题,那就可以往我这个方向考虑了,那就是高版本的ssh加密方式和低版本ssh啊hi见的加密方式不一样,大家知道最近ssh低于9版本有漏洞,所以ssh版本都升级到9以上了,但是部分还是9一下版本,这个就是免密失败的原因。

关键报错:

debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/liushuai/.ssh/id_rsa
debug3: no such identity: /home/liushuai/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ecdsa
debug3: no such identity: /home/liushuai/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ecdsa_sk
debug3: no such identity: /home/liushuai/.ssh/id_ecdsa_sk: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ed25519
debug3: no such identity: /home/liushuai/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ed25519_sk
debug3: no such identity: /home/liushuai/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_xmss
debug3: no such identity: /home/liushuai/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password

废话不多说,直接开干

系统ip介绍
kail系统192.168.126.132生成公钥,并推送到centos7上
centos7192.168.126.133接受免密,实现kail往centos7方向免密

先按照老的免密方式搞一波

生成密钥

┌──(liushuai㉿bogon)-[~]
└─$ ssh-keygen -t dsa   ###注意看,咱这边的加密方式是dsa,这个就是坑
Generating public/private dsa key pair.
Enter file in which to save the key (/home/liushuai/.ssh/id_dsa): 
Created directory '/home/liushuai/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/liushuai/.ssh/id_dsa
Your public key has been saved in /home/liushuai/.ssh/id_dsa.pub
The key fingerprint is:
SHA256:k47VhY43db0GBtwHoUvZIVgnPDYui3QtT4vsGgBXewQ liushuai@bogon
The key's randomart image is:
+---[DSA 1024]----+
|       E..==.=o  |
|      . o. BO..o |
|   . . . .=+=+o .|
|    o  ..O.*o.. .|
|     .. S %..  o |
|      .= * +  .  |
|      ..o        |
|        ..       |
|       ..        |
+----[SHA256]-----+

在这里插入图片描述

拷贝密钥

┌──(liushuai㉿bogon)-[~]
└─$ ssh-copy-id root@192.168.196.133
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/liushuai/.ssh/id_dsa.pub"
The authenticity of host '192.168.196.133 (192.168.196.133)' can't be established.
ED25519 key fingerprint is SHA256:ieG7iUYRDYyuZcBk5f2ABb9S2us0LzsIZEJqzhQwdFM.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.196.133's password: Number of key(s) added: 1Now try logging into the machine, with:   "ssh 'root@192.168.196.133'"
and check to make sure that only the key(s) you wanted were added.

在这里插入图片描述

测试免密登录

┌──(liushuai㉿bogon)-[~]
└─$ ssh root@192.168.196.133        
root@192.168.196.133's password:             ####还是需要密码的,为什么的接着往下看

在这里插入图片描述

原因分析

经过排查,是因为两台主机的ssh版本问题

kail系统的版本:OpenSSH_9.3p2 Debian-1

┌──(liushuai㉿bogon)-[~]
└─$ ssh -V                                                     
OpenSSH_9.3p2 Debian-1, OpenSSL 3.0.10 1 Aug 2023

在这里插入图片描述

centos的版本:7.4P1

在这里插入图片描述

进一步分析

利用ssh -vvv的功能,查看问题出现在哪里

                                                                             
┌──(liushuai㉿bogon)-[~]
└─$ ssh root@192.168.196.133
root@192.168.196.133's password: 
Last login: Wed Nov 29 07:52:35 2023
[root@bogon ~]# exit
logout
Connection to 192.168.196.133 closed.┌──(liushuai㉿bogon)-[~]
└─$ ssh root@192.168.196.133 -vvv
OpenSSH_9.3p2 Debian-1, OpenSSL 3.0.10 1 Aug 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.196.133 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/liushuai/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/liushuai/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.196.133 [192.168.196.133] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: Connection established.
debug1: identity file /home/liushuai/.ssh/id_rsa type -1
debug1: identity file /home/liushuai/.ssh/id_rsa-cert type -1
debug1: identity file /home/liushuai/.ssh/id_ecdsa type -1
debug1: identity file /home/liushuai/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/liushuai/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/liushuai/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/liushuai/.ssh/id_ed25519 type -1
debug1: identity file /home/liushuai/.ssh/id_ed25519-cert type -1
debug1: identity file /home/liushuai/.ssh/id_ed25519_sk type -1
debug1: identity file /home/liushuai/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/liushuai/.ssh/id_xmss type -1
debug1: identity file /home/liushuai/.ssh/id_xmss-cert type -1
debug1: identity file /home/liushuai/.ssh/id_dsa type 1
debug1: identity file /home/liushuai/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.3p2 Debian-1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: compat_banner: match: OpenSSH_7.4 pat OpenSSH_7.4* compat 0x04000006
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.196.133:22 as 'root'
debug3: record_hostkey: found key type ED25519 in file /home/liushuai/.ssh/known_hosts:1
debug3: record_hostkey: found key type ECDSA in file /home/liushuai/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 2 keys from 192.168.196.133
debug1: load_hostkeys: fopen /home/liushuai/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: have matching best-preference key type ssh-ed25519-cert-v01@openssh.com, using HostkeyAlgorithms verbatim
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
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
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:ieG7iUYRDYyuZcBk5f2ABb9S2us0LzsIZEJqzhQwdFM
debug3: record_hostkey: found key type ED25519 in file /home/liushuai/.ssh/known_hosts:1
debug3: record_hostkey: found key type ECDSA in file /home/liushuai/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 2 keys from 192.168.196.133
debug1: load_hostkeys: fopen /home/liushuai/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '192.168.196.133' is known and matches the ED25519 host key.
debug1: Found key in /home/liushuai/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: ssh_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: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: ssh_get_authentication_socket_path: path '/tmp/ssh-6WK2JhuI1VHD/agent.1125'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Skipping ssh-dss key /home/liushuai/.ssh/id_dsa - corresponding algo not in PubkeyAcceptedAlgorithms
debug1: Will attempt key: /home/liushuai/.ssh/id_rsa 
debug1: Will attempt key: /home/liushuai/.ssh/id_ecdsa 
debug1: Will attempt key: /home/liushuai/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /home/liushuai/.ssh/id_ed25519 
debug1: Will attempt key: /home/liushuai/.ssh/id_ed25519_sk 
debug1: Will attempt key: /home/liushuai/.ssh/id_xmss 
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
debug3: receive packet: type 51
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 gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: No credentials were supplied, or the credentials were unavailable or inaccessible
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)debug1: No credentials were supplied, or the credentials were unavailable or inaccessible
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)debug1: Unspecified GSS failure.  Minor code may provide more information
No such file or directorydebug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/liushuai/.ssh/id_rsa   ###出现找不到文件
debug3: no such identity: /home/liushuai/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ecdsa  ###出现找不到文件
debug3: no such identity: /home/liushuai/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ecdsa_sk  ###出现找不到文件
debug3: no such identity: /home/liushuai/.ssh/id_ecdsa_sk: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ed25519  ###出现找不到文件
debug3: no such identity: /home/liushuai/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_ed25519_sk  ###出现找不到文件
debug3: no such identity: /home/liushuai/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /home/liushuai/.ssh/id_xmss  ###出现找不到文件
debug3: no such identity: /home/liushuai/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
root@192.168.196.133's password: 

在这里插入图片描述
在这里插入图片描述

更改加密方式为rsa

清理掉之前的密钥文件

──(liushuai㉿bogon)-[~]
└─$ cd .ssh ┌──(liushuai㉿bogon)-[~/.ssh]
└─$ ls    
id_dsa  id_dsa.pub  known_hosts  known_hosts.old┌──(liushuai㉿bogon)-[~/.ssh]   ###直接在.ssh目录下,清理即可,如有需要建议备份
└─$ rm -rf *
zsh: sure you want to delete all 4 files in /home/liushuai/.ssh [yn]? y┌──(liushuai㉿bogon)-[~/.ssh]
└─$ ls

在这里插入图片描述### 重新生成密钥

┌──(liushuai㉿bogon)-[~/.ssh]
└─$ ssh-keygen -t rsa              ##更换了加密算法为rsa 
Generating public/private rsa key pair.
Enter file in which to save the key (/home/liushuai/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/liushuai/.ssh/id_rsa
Your public key has been saved in /home/liushuai/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:VvO9A4ARor8FdlPJ2n6mpUy0ZOp3jRQpaitbqKTGTRI liushuai@bogon
The key's randomart image is:
+---[RSA 3072]----+
|      . oo..     |
|     . . +o      |
|    . o +o+  .   |
|  E  o o.o*+o.   |
|   .  . SB oo..  |
|  . .  =+ + =. . |
| . +. oo.+ B oo  |
|  oo....o = o .. |
| .. . .o . .     |
+----[SHA256]-----+

推送密钥

──(liushuai㉿bogon)-[~/.ssh]
└─$ ssh-copy-id root@192.168.196.133   ###推送方式不变
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/liushuai/.ssh/id_rsa.pub"
The authenticity of host '192.168.196.133 (192.168.196.133)' can't be established.
ED25519 key fingerprint is SHA256:ieG7iUYRDYyuZcBk5f2ABb9S2us0LzsIZEJqzhQwdFM.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.196.133's password: Number of key(s) added: 1Now try logging into the machine, with:   "ssh 'root@192.168.196.133'"
and check to make sure that only the key(s) you wanted were added.

在这里插入图片描述

测试免密效果

└─$ ssh root@192.168.196.133                                   
Last login: Wed Nov 29 07:58:29 2023 from 192.168.196.132
[root@bogon ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope host valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 00:0c:29:96:4f:10 brd ff:ff:ff:ff:ff:ffinet 192.168.196.133/24 brd 192.168.196.255 scope global noprefixroute dynamic ens33valid_lft 1416sec preferred_lft 1416secinet6 fe80::bbeb:becc:8125:c52f/64 scope link noprefixroute valid_lft forever preferred_lft forever
[root@bogon ~]# exit
logout                                                                                                                                                                                                     
Connection to 192.168.196.133 closed.

在这里插入图片描述

结束语

没有随随便便的成功,只有不断的努力

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/183986.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

CSS新手入门笔记整理:CSS边框样式

边框宽度&#xff1a;boder-width 语法 boder-width:像素值&#xff1b; 边框样式&#xff1a;boder-style 语法 boder-style:取值&#xff1b; 属性值 说明 none 无样式 dashed 虚线 solid 实线 边框颜色&#xff1a;boder-color 语法 boder-color:色值&#xf…

Mysql之子查询(知识点+例题)

Mysql之子查询<知识点例题> 什么是子查询案例分析案例分析子查询的分类单行子查询子查询中的空值问题题目练习题目一题目二题目三题目四题目五补充&#xff1a;聚合函数与GROUP BY的使用关系 CASE表达式&#xff08;子查询中的运用&#xff09;简单CASE表达式搜索CASE表达…

电脑突然死机怎么办?教你几招快速拯救

当今社会&#xff0c;电脑成为我们日常生活和工作不可或缺的一部分。然而&#xff0c;有时电脑可能会突然死机&#xff0c;给我们的操作和数据带来不便。那电脑突然死机怎么办呢&#xff1f;本文将介绍解决电脑突然死机的三种方法&#xff0c;通过详细的步骤指南&#xff0c;帮…

类 —— 继承、多重继承

继承 一个类&#xff0c;继承另一个已有的类。&#xff08;在一个已存在的类的基础上建立一个新的类&#xff0c;并拥有其特性&#xff09; 是一个父类&#xff08;基类&#xff09;派生出子类&#xff08;派生类&#xff09;的过程。 派生类往往是基类的具象化&#xff0c;基…

接口测试之测试原则、测试用例、测试流程......

一、接口的介绍 软件测试中&#xff0c;常说的接口有两种&#xff1a;图形用户接口&#xff08;GUI&#xff0c;人与程序的接口&#xff09;、应用程序编程接口&#xff08;API&#xff09;。 接口&#xff08;API&#xff09;是系统与系统之间&#xff0c;模块与模块之间或者…

异常数据检测 | Python实现oneclassSVM模型异常数据检测

支持向量机(SVM)的异常检测 SVM通常应用于监督式学习,但OneClassSVM[8]算法可用于将异常检测这样的无监督式学习,它学习一个用于异常检测的决策函数其主要功能将新数据分类为与训练集相似的正常值或不相似的异常值。 OneClassSVM OneClassSVM的思想来源于这篇论文[9],SVM使用…

unity UGUI中获取点击位置处的URL链接

需求是&#xff0c;我们在一个text组件中像写网页那样写入链接&#xff0c;然后点击这个链接&#xff0c;就能访问配置的网页啥的。比如&#xff1a; <a href"hello">链接文本</a></summary> 最终的效果如下&#xff1a; 图中&#xff0c;image区…

华为智能手表独立导航,一呼即应轻松畅行

PetalMaps 手表独立导航&#xff0c;一声令下唤醒导航&#xff0c;打造了智慧的语音交互唤醒体验功能。导航时&#xff0c;语音播报、变道震动提醒功能&#xff0c;让您尽情体验腕上导航乐趣&#xff0c;同时又能安全抵达目的地。

通过滴滴技术博客:探寻造成此次P0故障的真正原因

2023年11月27日晚至2023年11月28日早晨&#xff0c;滴滴发生了长达12小时的P0级故障&#xff0c;导致滴滴核心业务都受到了影响&#xff0c;比如不显示定位无法打车、滴滴单车无法扫码等问题&#xff0c;期间滴滴进行了多次致歉 目前问题故障已经恢复&#xff0c;根据最新的消息…

Python使用pywebview开发桌面应用:打造现代化、跨平台的用户体验

更多资料获取 &#x1f4da; 个人网站&#xff1a;ipengtao.com 在当今科技快速发展的时代&#xff0c;为了提供更好的用户体验&#xff0c;许多应用程序都转向了桌面应用的开发。在Python领域&#xff0c;pywebview是一款优秀的库&#xff0c;它使得用Web技术开发桌面应用变得…

flask中路由route根据字典ID展示部分内容,字典名展示全部内容

from flask import Flask, jsonify , request,render_template,app Flask(__name__)app.config[JSON_AS_ASCII] Falsebooks [{"id": 1, "name": 三国演义},{"id": 2, "name": 水浒传},{"id": 3, "name": 西游记…

王道p18 2.设计一个高效算法,将顺序表L的所有元素逆置,要求算法的空间复杂度为 O(1)。(c语言代码实现)

视频讲解在这&#xff08;谢谢各位大佬&#xff09;&#xff1a;&#x1f447; c语言代码实现数据结构课后代码题顺序表p18 2_哔哩哔哩_bilibili 本题代码如下 void nizhi(struct sqlist* s) {int temp 0;for (int i 0; i < s->length / 2; i){temp s->a[i];s-&…

【Springboot系列】SpringBoot整合Jpa

文章目录 前言&#xff1a;什么是JPA&#xff1f;JPA优缺点优点1.简化开发&#xff1a;2.高度抽象&#xff1a;3.跨数据库支持&#xff1a;4.自动化的事务管理&#xff1a; 缺点1.学习成本较高&#xff1a;2.性能问题&#xff1a;3.灵活性受限&#xff1a; 示例版本依赖代码Use…

linux 服务 下 redis 安装和 启动

官网下载 https://redis.io/download/ 安装步骤&#xff1a; 1.安装redis 所需要的依赖 yum install -y gcc tcl2.上传安装包并解压&#xff0c;下载安装包&#xff0c;上传到/usr/local/src目录&#xff0c;解压 tar -zxvf redis-7.2.3.tat.gz进入安装目录&#xff0c;运行…

【SK-learn学习】1.16 概率校准

一、说明 概率校准&#xff0c;指的是对于分类器而言&#xff0c;对应多种类别&#xff0c;概率最大就将样本归入&#xff0c;这个事实没有考虑置信度的问题。sklearn的calibration就是指的这种情形&#xff0c;参考本文。 二、关于sklearn.calibration的概念 执行分类时&#…

Haskell和http-client库下载代码示例

haskell import Network.HTTP.Client 然后&#xff0c;我们需要定义一个函数来下载视频。这个函数将接收一个URL作为参数&#xff0c;并返回一个IO动作&#xff0c;该动作将下载视频文件到当前目录。 haskell downloadVideo :: String -> IO () downloadVideo url do --…

Kubernetes(K8s)资源管理-03

资源管理 资源管理介绍 在kubernetes中&#xff0c;所有的内容都抽象为资源&#xff0c;用户需要通过操作资源来管理kubernetes。 kubernetes的本质上就是一个集群系统&#xff0c;用户可以在集群中部署各种服务&#xff0c;所谓的部署服务&#xff0c;其实就是在kubernetes集…

【同一局域网下】访问其他电脑的虚拟机

一、在被连接的电脑上对VMware进行设置 编辑 --> 虚拟网络编辑器 按顺序点击 如果22端口已被占用&#xff0c;可以自行定义 &#xff08;端口号越大&#xff0c;被占用的可能性越小&#xff09; 二、在被连接的电脑上对防火墙进行设置&#xff08;这里以win11为例&#xff…

AppDelete 4.3.3(软件清理卸载工具)

AppDelete for Mac是一款运行在Mac平台上的强大软件卸载工具&#xff0c;AppDelete Mac版不仅可以删除应用程序&#xff0c;还可以删除小部件&#xff0c;首选项窗格&#xff0c;插件和屏幕保护程序及其相关文件&#xff0c;卸载快速又干净&#xff0c;仅需要简单的拖拽即可。 …

【端到端可微1】端到端的训练,使用反向传播,要求过程可微分

文章目录 背景想法&#xff1a; Weighted least-squares fitting方法&#xff1a; Backpropagating through the fitting procedure.温习之前的基础前向传播反向传播 总结 背景 想做一个端到端训练的模型&#xff0c;将最小二乘嵌入其中。因此有了这系列文章。 想法&#xff…