proftpd加裝ssl讓連線ftp時可以加密方式傳輸檔案
作者:cross 日期:2012-01-20 10:20
這個叫作 FTPS = FTP + SSL
有另一個名詞叫 SFTP = SSH + FTP ,也就是把 SSH 當 FTP用,跟FTPS名詞不同,走的協定也不同
相同的是傳輸都有加密
先看 proftpd 有沒有支援 ssl。沒有就安裝(省略)
# proftpd -l
Compiled-in modules:
mod_core.c
mod_xfer.c
mod_auth_unix.c
mod_auth_file.c
mod_auth.c
mod_ls.c
mod_log.c
mod_site.c
mod_delay.c
mod_codeconv.c
mod_auth_pam.c
mod_ratio.c
mod_readme.c
用scponly來限制只能ssh傳檔案,但無法ssh登入 (更新)
作者:cross 日期:2012-01-19 14:00
scponly是什麼
scponly : Restricted shell for ssh based file services
我可以用在什麼地方
今天假如我開放讓某個人可以ssh,但目的只是要抓檔案,我就可以用scponly來限制這個使用者只能抓,而無法登入主機操作了
環境 : server
CentOS release 5.7 (Final)
2.6.18-274.el5 #1 SMP Fri Jul 22 04:49:12 EDT 2011 i686 i686 i386 GNU/Linux
怎麼安裝
如何在ssh登入主機遠端主機時不要有key的檢查
作者:cross 日期:2012-01-03 09:16
第一次登入的情況
第二次登入,但已是不同key了的情況[root@xx1 ~]# ssh 1.1.1.1
The authenticity of host '1.1.1.1 (1.1.1.1)' can't be established.
RSA key fingerprint is 5d:72:df:77:24:a9:80:e6:d1:23:68:4f:d9:42:6b:44.
Are you sure you want to continue connecting (yes/no)?
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
e1:9b:5c:16:a6:cd:11:10:3a:cd:1b:a2:16:cd:e5:1c.
設定ssh連線30分鐘後沒有動作就自動斷線
作者:cross 日期:2011-12-26 23:59
想讓ssh在無動作之後一段時間可以自動中斷連線,這樣子也可以顧及安全性
試過 /etc/ssh/sshd_config的 ClientAliveInterval 60、及 /etc/ssh/ssh_config 的 ServerAliveInterval 60,似乎都無法達到我的目的,
試著下列設定方式
試過 /etc/ssh/sshd_config的 ClientAliveInterval 60、及 /etc/ssh/ssh_config 的 ServerAliveInterval 60,似乎都無法達到我的目的,
試著下列設定方式
echo "TMOUT=1800" >> /etc/bashrc
echo "readonly TMOUT" >> /etc/bashrc
echo "export TMOUT" >> /etc/bashrc
登出再登入測試即可達到目的
apache的網頁帳密功能(mod_auth)搭配使用WindowsAD作認證
作者:cross 日期:2011-12-26 12:19
1。安裝 mod_authz_ldap
4。瀏覽 http://10.10.10.111/test ,測試登入帳密是否可以成功用AD的帳密登入
ref : http://www.extmail.org/forum/thread-12794-1-1.html
2。設定 apache ,vi /etc/httpd/conf.d/htaccess.confyum install mod_authz_ldap
3。重啟apache<Directory /var/www/html/test>
AuthzLDAPMethod ldap
AuthzLDAPAuthoritative on
AuthzLDAPServer 10.10.10.123:389 # AD 的IP
AuthzLDAPUserBase "DC=cross,DC=local" # AD的網域名稱,我的是 cross.local
AuthzLDAPUserKey sAMAccountName
AuthzLDAPUserScope subtree
AuthzLDAPBindDN "cross" # AD 管理者的帳號
AuthzLDAPBindPassword "crosspassword" # AD 管理者的密碼
AuthName "Need Password with using AD"
AuthType Basic
require valid-user
</Directory>
4。瀏覽 http://10.10.10.111/test ,測試登入帳密是否可以成功用AD的帳密登入
ref : http://www.extmail.org/forum/thread-12794-1-1.html
top指令
作者:cross 日期:2011-11-10 18:54
臨時變更linux的命令提示字元PS1
作者:cross 日期:2011-10-27 12:21



