瀏覽模式: 普通 | 列表

這個叫作 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

[閱讀全文]

標籤: proftpd ssl ftp ftps

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

怎麼安裝

[閱讀全文]

標籤: scponly ssh

第一次登入的情況

[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)?
第二次登入,但已是不同key了的情況

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 key login

設定ssh連線30分鐘後沒有動作就自動斷線

想讓ssh在無動作之後一段時間可以自動中斷連線,這樣子也可以顧及安全性

試過 /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

登出再登入測試即可達到目的

標籤: ssh session timeout

1。安裝 mod_authz_ldap
yum install mod_authz_ldap
2。設定 apache ,vi /etc/httpd/conf.d/htaccess.conf
<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>
3。重啟apache

4。瀏覽 http://10.10.10.111/test ,測試登入帳密是否可以成功用AD的帳密登入


ref : http://www.extmail.org/forum/thread-12794-1-1.html

top指令

-d : 幾秒更新一次畫面,預設 3秒,ex: top -d 1
-b : 批次輸出
-n : 與 -b 搭配的話可以指定輸出幾次,ex: top -b -n1

執行 top 後,可以用 P 來排序 CPU 使用量、M 則是記憶體
標籤: top 指令

臨時變更linux的命令提示字元PS1

目的 : 辨識用

預設是 :
PS1="u@h W]# "
可以加點變化
PS1="u@h  wow w]# "
就變成
root@localhost 12:19:55 wow /var/www/html]#
標籤: ps1