SSH协议(Secure Shell)

常用的SSH工具

Xmanager工具

  • Xftp和Xshell
    • xftp远程文件传输软件 SFTP协议
    • Xshell远程终端模拟软件 SSH协议

端口号

  1. ssh:22
  2. mysql:3306
  3. tomcat:8080
  4. #端口号有可能被占用,有可能没有开放端口号

防火墙

在linux 系统中自带防火墙,防火墙会将端口号全部屏蔽掉,防止攻击你

  • 攻击手段
    • 越过前端无线长度字段名 用户名
    • alert 弹窗

启动网卡命令

  1. ifconfig [网卡标识] up #启动网卡
  2. ifconfig [网卡标识] down #关闭网卡命令
  3. dhclient #重写获取ip命令

Linux进程和程序

进程

是程序运行的动态描述 进程PID:linux系统中的进程的唯一标识

查看进程(查看系统中的远程连接进程”SSH”是否开启)

  1. ps -ef|grep[进程标识] #查看ssh进程是否启动/根据标识模糊查询
  2. kill -9 pid #强制停止进程
  3. service sshd stop #ssh进程停止
  4. service sshd start #ssh进程启动
  5. service iptables stop #关闭防火墙

例如

  1. [root@localhost ~]# ps -ef|grep ssh
  2. root 1127 1 0 08:09 ? 00:00:00 /usr/sbin/sshd -D
  3. root 2207 2035 0 08:09 ? 00:00:00 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "env GNOME_SHELL_SESSION_MODE=classic gnome-session --session gnome-classic"
  4. root 2983 1127 0 08:10 ? 00:00:00 sshd: root@pts/0
  5. root 2987 1127 0 08:10 ? 00:00:00 sshd: root@notty
  6. root 3011 2987 0 08:10 ? 00:00:00 /usr/libexec/openssh/sftp-server
  7. root 3850 2988 0 09:01 pts/0 00:00:00 grep --color=auto ssh
  8. [root@localhost ~]# ps -ef|grep mysql
  9. root 3896 2988 0 09:02 pts/0 00:00:00 grep --color=auto mysql
  10. [root@localhost ~]# ps -ef|grep jdk
  11. root 3899 2988 0 09:03 pts/0 00:00:00 grep --color=auto jdk
  12. [root@localhost ~]# ps -ef|grep tomcat
  13. root 3901 2988 0 09:03 pts/0 00:00:00 grep --color=auto tomcat
  14. ############################

image.png