# attach containerpodmanexec-it wechar_build2 bash# install ssh package and generate ssh keyapt update &&aptinstall openssh-server && ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N''# generate ssh public key to be used in such as git
ssh-keygen -q-t rsa -N''-f ~/.ssh/id_rsa# change the Port in /etc/ssh/sshd_configecho Port 3368>> /etc/ssh/sshd_config
# startup sshdservicessh start
# To debug the sshd, you can run cmd: /usr/sbin/sshd -p3368 -D -d -e# add your local public key (~/.ssh/id_rsa.pub) to container ~/.ssh/authorized_keys # to support ssh login through ssh keyvim ~/.ssh/authorized_keys
一:各文件的使用回顾
1.items的使用
items 文件主要用于定义储存爬取到的数据的数据结构,方便在爬虫和 Item Pipeline 之间传递数据。
items.pyimport scrapyclass TencentItem(scrapy.Item):# define the fields for your item here like:title scr…
242.有效的字母异位词
数组、set、map,数组是比较高效查找的
函数功能
判断字符串 s 和 t 是否互为字母异位词。如果它们包含相同的字符且每个字符出现的次数也相同,那么它们互为字母异位词。
代码逻辑 长度检查: if (s.length ! t.lengt…