Posted in Linux on Dec 24th, 2011
Geany 是一套我覺得在 Linux 作業系統底下蠻簡易及輕量的程式編輯器,之前撰寫一篇 Linux 程式開發編輯器 Geany + Fuse 遠端掛載 簡易介紹如何使用 Fuse,這次發現一個小問題,就是掛載要儲存檔案時候出現底下錯誤訊息 Error renaming temporary file: Operation not permitted. The file on disk may now be truncated! 此錯誤訊息發生在用 Fuse 掛載遠端系統所造成,原先掛載指令如下 sshfs appleboy@xxxx.com.tw:/home/appleboy /home/git/CN -p 22 -o reconnect,sshfs_sync -o uid=1000,gid=1000 我們只需要另外加上 workaround=rename flag 及可以解決此問題 sshfs appleboy@www.cn.ee.ccu.edu.tw:/home/appleboy /home/git/CN -p 22 -o reconnect,sshfs_sync -o uid=1000,gid=1000 -o workaround=rename 測試環境為 [...]
Read Full Post »
Posted in Linux, Ubuntu on Jul 21st, 2011
自己買的筆電灌上了 Ubuntu 作業系統,Linux 系統好處多多,指令自己也熟悉,想架什麼站都可以,但是最主要還是要找一套程式開發編輯器,網路上看了大部份文章,我決定用 Geany 這套免費的編輯器,在 Windows XP 底下我則是使用 PSPad 搭配內建的 FTP 功能遠端編輯寫程式,但是 Geany 並沒有支援 FTP 功能,可以詳細看到官方網站 Q&A,官方建議搭配 Fuse 或 LUFS,這樣並不只是 Geany 可以使用,其他 Application 也可以任意使用了。 在介紹 Fuse 之前可以先參考過去寫的一篇教學: [SSHFS] 好用的 SSH Filesystem fusefs-sshfs in FreeBSD or Linux,裡面分享了 FreeBSD 跟 Linux 底下的 tarball 安裝方式,當然現階段 Ubuntu 安裝就很容易了,透過 Apt 管理的方式安裝: $ apt-cache search sshfs sshfs – filesystem client [...]
Read Full Post »
Posted in FreeBSD, Linux on Mar 11th, 2010
DenyHosts 是一套用 Python 跟 shell script 寫出來的 open source base on Linux or FreeBSD (/var/log/secure on Redhat, /var/log/auth.log on Mandrake, FreeBSD, etc…),用來阻擋 SSH Server 被攻擊,之前寫一篇 FreeBSD 安裝設定教學,有一點沒有注意到,就是打開 /etc/hosts.allow,注意要把 ALL : ALL : allow 放到最後一行,跟 iptables 設定原理是一樣的,會從第一條規則開始比對,如果比對成功,下面的 rule 就會略過比對了,參考英文說明: Start by allowing everything (this prevents the rest of the file from working, so remove it when [...]
Read Full Post »
Posted in FreeBSD, Linux on Dec 26th, 2008
不管是架設好 Linux 跟 FreeBSD 通常都會有國外的 hacker 來 try 機器的 SSH 帳號密碼,我想這是很正常的,網路上也提供很多方法來分析 Log 檔,FreeBSD:/var/log/auth.log,我可以分析檔案,然後再利用 firewall like ipfw or pf 的方式來達到,或者是利用寫到 /etc/hosts.deny 來達到 Block 的功能,網路上有很多工具可以用,例如 DenyHosts,sshguard 或者是 sshit,可以參考我之前寫的一篇利用 sshit 來達到阻擋 ssh 使用者,然而今天來介紹一下 DenyHosts 再 FreeBSD 底下如何設定,還蠻方便的。 首先利用 ports 安裝,DenyHosts 是利用 python 的程式語言寫出來的: Port: denyhosts-2.6_2 Path: /usr/ports/security/denyhosts Info: Script to thwart ssh attacks Maint: janos.mohacsi@bsd.hu [...]
Read Full Post »
Posted in FreeBSD, Linux, Ubuntu on Apr 16th, 2008
今天在 ptt Linux 連線版文章看到有人問說,如何傳一檔案到其他的 linux 機器,有人推了一個軟體,我覺得相當不錯,就拿來玩看看了,這軟體就是 sshfs 這是一套可以直接掛載遠端機器目錄的軟體,走 ssh 協定,剛剛安裝了一下,發覺還蠻好用的,我在 Linux 跟 FreeBSD 上面都安裝好了,來紀錄一下步驟。 首先是安裝步驟 For FreeBSD,直接利用 ports 安裝即可: # # ports 安裝 # # Port: fusefs-sshfs-1.8 # Path: /usr/ports/sysutils/fusefs-sshfs # Info: Mount remote directories over ssh # Maint: amistry@am-productions.biz # pkg-config-0.22_1 # WWW: http://sourceforge.net/projects/fuse/ cd /usr/ports/sysutils/fusefs-sshfs; make install clean
Read Full Post »
Posted in FreeBSD, Linux, windows on Mar 19th, 2008
今天在看 gslin 部落格的一篇文章:穿越公司的 FireWall,看完之後我覺得相當不錯,可以解決我想要的 forwarding 的問題,以及繞過防火牆的機制,剛剛自己測試一下,發現還蠻好用的,其實利用這個方式還可以遠端管理很多伺服器,如:Mysql 伺服器…. SSH Tunnel必須建立於一個SSH連線上,它可以讓我們穿透防火牆,建立一個安全加密的傳輸。 例如:我們現在要透過 A主機去對 smtp 或者是 http 做連接的動作,那我們就必須先建立一個到A主機的SSH連線,然後在透過它建立 Tunnel 我們會使用到的putty和plink都可以在 這裡下載, 不過我更喜歡pietty,由piaip長輩製作。
Read Full Post »
Posted in FreeBSD, Linux on Nov 26th, 2006
上傳: scp -r -P 2500 /etc/crontab appleboy@hostname.com:/home/appleboy/ 下載: scp -r -P 2500 appleboy@hostname.com:/home/appleboy/crazy.sql . -r 遞迴 下載 -P ssh port 後面的點 . 你可以換成你想下載到你的哪個目錄
Read Full Post »
Posted in FreeBSD on Nov 4th, 2006
系統:FreeBSD 6.0-RELEASE 安裝方式: cd /usr/ports/security/sshit/ make install clean 設定檔 /usr/local/etc/sshit.conf # Sample configuration file of sshit.pl # We use pf as firewall on default 看你喜歡用什麼防火牆,我熟悉ipfw FIREWALL_TYPE = ipfw # Number of failed login attempts within time before we block MAX_COUNT = 3 # Time in seconds in which all failed login attempts must occur WITHIN_TIME [...]
Read Full Post »