当前位置: 首页 >> Tag标签为 'ssh'

某Linux主机成为肉鸡后的全过程

相信很多Linux管理员都遇到过不经意间将某主机放到互联网上,为了登录方便,将root口令设置成弱口令,结果一段时间以后发现root口令被修改了,其实你的机器已经被“黑客”拿下了,并且已经成功的成为肉鸡,正在为他们干活呢,以下是某Linux主机root口令被拿下后执行的一些操作。

Read the rest of this entry »

如何防止SSH服务被暴力攻击

如果大家稍微注意一下,你或许会发现,你放在互联网上的主机成天都在被扫描,SSH用户名/密码在不停的被试探,当然,你可以通过防火墙来限制IP地址对TCP/22的访问,这对管理员来说可能需要有一台固定的机器作为跳板;或许你可以通过公钥来登录,但是你机器上的某些用户或许只会通过用户名/密码这种方式来登录;当然,你还可以修改sshd默认监听的端口。

Read the rest of this entry »

SSH黑名单自动更新脚本-sshbl.org

刚刚查看服务器SSH的secure日志,对一些试探root口令的IP地址进行分析,却无意中发现互联网已经有提供此项服务的网站sshbl.org – (the SSH blacklist),详见:http://www.sshbl.org/

Read the rest of this entry »

Using SSH ControlMaster for Single Sign-On

OpenSSH has an option called ControlMaster that enables the sharing of multiple sessions over a single network connection. This means that you can connect to Odyssey once, enter your password and PASSCODE, and have all other subsequent ssh sessions (including svn, rsync, etc. that run over ssh) piggy-back off the initial connection without need for re-authentication. You can specify such options each time on the command line, but it’s easiest if you put it in your ssh client configuration file so that it applies every time.

Read the rest of this entry »

SSHFS for Windows — *nix与Windows文件共享的一种方式

提到Windows如何与Linux(Unix)文件共享,大家最先想到的就是以下这些了:

1、Samba:似乎有一种先入为主的感觉,因为几乎所有的书籍都是这么介绍的,的确,Samba做的很好,并且能够很好的实现Windows与Unix类系统进行文件及打印机等资源共享。

缺点:如果不是在同一个子网,受限制与管理员(如果445端口被封了,只能靠VPN来搞定了)。

Read the rest of this entry »

解决SSH X11-Forwarding无法工作

熟悉SSH X11-Forwarding的朋友都知道,只要打开SSH X11-Forwarding后,远程的图形界面就可以通过SSH的加密隧道“拽”到本地的xserver上来,无需手动在远程设置DISPLAY变量。

Putty设置X11-Forwarding方法:

Connection ->  SSH -> X11 -> X11 frowarding -> Enable X11 forwarding

检查X11 forwarding是否开启方法:

登录远程主机后,运行:

set | grep DISP
DISPLAY=localhost:10.0

但是在某些主机上,无论你在客户端如何设置,都无法正确的使能X11 forwarding功能,登录后DISPLAY永远是空值。sshd_config文件也没有将X11 forwarding功能禁用。

解决办法:

原来X11 forwarding依赖“xorg-x11-xauth”软件包,所以必须先安装“xorg-x11-xauth”软件包。

yum install xorg-x11-xauth

安装“xorg-x11-xauth”后首次登录远程主机提示

/usr/bin/xauth:  creating new authority file /home/wzk/.Xauthority

Linux让autofs自动挂载sshfs文件系统

熟悉autofs的人都知道,autofs主要是用于一些不太常用的存储空间,在需要的时候自动挂载上来,如果自动挂载上来的文件系统长时间没有任何进程访问,该文件系统就会自动被卸载,特别适用于备份数据和mount一些ISO的文件。

在/etc/auto.master增加

/mnt/sshfs /etc/auto.sshfs uid=500,gid=500,--timeout=30,--ghost

在/etc/auto.sshfs增加

test -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#wzk@192.168.1.1\:/test

Putty Mirroring guidelines

If you want to set up a mirror of the PuTTY website, go ahead and set one up. Please don’t bother asking us for permission before setting up a mirror. You already have permission.

If the mirror is in a country where we don’t already have plenty of mirrors, we may be willing to add it to the list on this page. Read the guidelines below, make sure your mirror works, and email us the information listed at the bottom of the page. Read the rest of this entry »