当前位置:网站首页>第二十五周记录
第二十五周记录
2022-06-25 03:59:00 【3ackr0d】
1、通过一次htb渗透学习linux命令
1.1 ssh命令
ssh 连接有两种方式,一是口令密码,二是公钥登录
ssh [email protected] [-p] # ssh默认端口是22,如果有更改,用 -p参数 指定
公钥登录流程
- ssh-keygen 创建公私钥
-t
指定加密类型-f
指定生成的文件名 - ssh-copy-id 将公钥上传到服务器中 /.ssh/authorized_keys
-i
指定公钥文件 - ssh -i 私钥文件 [email protected]
ssh-keygen -t rsa -f 3ackr0d
ssh-copy-id -i 3ackr0d [email protected]
ssh -i 3ackr0d [email protected]
注意:要想修改成只能公钥登录,可以更改配置文件
#/etc/ssh/sshd_confing
PasswordAuthentication 改为 no
1.2 ln命令
全称:make links between files, ln取的是link的两个字母
利用方法:
ln 链接上 下载的文件(公钥)和 /root/.ssh/authorized_keys,然后就可以用ssh以root身份登录
ln
-s 建立软链接,注意源文件名必须是绝对路径
-f 如果目标文件存在,那么-f参数会覆盖掉目标文件
1.3 echo命令
输出内容
-n
去掉echo后面的换行符-e
反斜杠转义生效
单引号、双引号、不加引号的区别
- 单引号里面的内容原封不动的输出
- 双引号里面
$
\
`(反引号)会起作用 - 不加引号会把所有的内容解释
1.4 base64
对内容进行base64编码和解码
echo -n hello | base64
echo -n hello | base64 -d #-d参数是解码
2 python写程序调试
执行程序的时候 用 python -i target.py 进入交互界面
dir() #查看内置方法
边栏推荐
- A-table mouse over the display hand, the current line can be clicked
- Leetcode points to the leetcode road of offering II 091 house painting [dynamic planning] heroding
- 2021.6.14 notes
- Laravel document sorting 6. Response
- Failed to install redis interface
- 小心被偷脸!天天用的人脸识别风险原来这么多?
- Doubts about judging the tinyint field type of MySQL
- Acmstreamopen return value problem
- Laravel document sorting 7. View
- 无法安装redis接口
猜你喜欢
Where is the red area of OpenCV?
Zoran community
Hello CTP (II) -- Introduction to CTP
Flutter FittedBox组件
Shutter fittedbox component
Basic use of OBS browser+ browser
WMS仓储管理系统的使用价值,你知道多少
Lecture record: history and development of strapdown inertial navigation solution
无法安装redis接口
"Renaissance" in the digital age? The bottom digital collection makes people happy and sad
随机推荐
Hello CTP (IV) - CTP transaction API
The yii2 debug toolbar is missing
"Grammar sugar" -- my new programming knowledge
How to install opencv? Opencv download installation tutorial
Shutter fittedbox component
Cesium 加载显示热力图
Flutter Builder & futurebuilder components
kenlm
L'épée leetcode fait référence au chemin leetcode de l'offre II 091 pour peindre la maison [planification dynamique] heroding
【LeetCode】143. Rearrange linked list
Finereport displays and hides column data according to conditions
UCLA | generative pre training for black box optimization
LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路
单元测试覆盖率
Laravel document sorting 2. Route related
Introduction to intstream API
Win10 environment phpstudy2016 startup failure record
关于TCP连接三次握手的详细总结
代表多样性的彩色 NFT 系列上线 The Sandbox 市场平台
Cesium loading display thermal diagram