易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux客户端使用SSH的命令管理linux服务器






<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
TD P { margin-bottom: 0cm }
A:link { so-language: zxx }
-->
登陆:ssh [hostname] 
输入密码:*****

陆以后就可以像控制自己的机器一样控制它了,不过没有可视化的界面。不过现在
我所使用过的两个版本Linux(SUSE
和FC5)
中有可以使用类似FTP
界面的工具。使用工具连接时,选择SSH
,端口是填服务器的SSH
端口,默认是22
,但是还是要手工填写。连接上以后FTP
界面和shell
同时使用可以
提高工作效率。

# visudo
%wheel ALL=(ALL) ALL
# gpasswd -a user1 wheel
4)
限制 ssh

使用者名单
# vi /etc/pam.d/sshd
auth required
pam_listfile.so item=user sense=allow file=/etc/ssh_users ōnerr=fail
# echo user1 >>
/etc/ssh_users
5)
封锁 ssh

联机并改用 web
控管清单
# iptables -I INPUT -p tcp
--dport 22 -j DROP
# mkdir
/var/www/html/ssh_open
# cat >
/var/www/html/ssh_open/.htaccess < AuthName "ssh_open"
AuthUserFile
/var/www/html/ssh_open/.htpasswd
AuthType basic
require valid-user
END
# htpasswd -c
/var/www/html/ssh_open/.htpasswd user1
(
最好还将 SSL

设起来,
或只限
https
联机更佳,

我这里略过 SSL
设定,

请读者自补.)
(
如需控制联机来源,

那请再补 Allow/Deny

项目,
也请读者自补.)
# cat >
/var/www/html/ssh_open/ssh_open.php < //Set dir path for ip list
$dir_path=".";
//Set filename for ip list
$ip_list="ssh_open.txt";
//Get client ip
$user_ip=$_SERVER['REMOTE_ADDR'];
//allow specifying ip if
needed
if (@$_GET['myip']) {
$user_ip=$_GET['myip'];
}
//checking IP format
if
($user_ip==long2ip(ip2long($user_ip))) {
//Put client ip to a file
if(@!($file =
fopen("$dir_path/$ip_list","w+")))
{
echo "Permission
denied!!
";
echo "Pls Check your
rights to dir $dir_path or file $ip_list";
}
else
{
fputs($file,"$user_ip");
fclose($file);
echo "client
ip($user_ip) has put into $dir_path/$ip_list&quo


相关文档:

Linux下GetModuleFileName的四种写法

Linux下GetModuleFileName的四种写法
  问题的起因是要把一个东东从Windows移植到基于Linux的嵌入式系统上。移植过程中,遇到了GetModuleFileName的问
题。为了解决这个问题,花了不少的时间,也走了不少弯路。下面是整理的结果。
  首先摘录一段文字,来源《UNIX Programming FAQ 中文版》
 
1.14. 我怎样找 ......

linux 64bit firefox flash plugin

http://plugindoc.mozdev.org/linux-amd64.html#flash
download flash:
http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
cp libflashplayer.so /usr/lib/mozilla-firefox/plugins
restart firefox
check:
about:plugins ......

Linux Webcam and TV【Linux 摄像头 和 电视】

 HowTo WebCam On Linux
Five fun ways to use a Linux webcam
http://www.linux.com/archive/articles/126186
The Webcam HOWTO
http://tldp.org/HOWTO/html_single/Webcam-HOWTO/
WebCam under Linux
http://www.seismo.ethz.ch/linux/webcam.html
‘Webcams in Linux, Part 1
http://www.linuxplanet. ......

Linux关机命令

1 shutdown:
[NAME
]  shutdown - bring the system down
SYNOPSIS
       /sbin/shutdown [-t sec] [-arkhncfF] time [warning-message]
DESCRIPTION
       shutdown  brings  the  system  down  in a secure way.&nb ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号