2012/10/18
SSH in CentOS 6.3
SSH 安裝
#sudo yum install openssh-server openssh-clients
SSH 開機時啟動
#sudo /sbin/chkconfig sshd on
SSH 啟動
#sudo /sbin/service sshd start
防火牆設定
#sudo vi /etc/sysconfig/iptables
添加下面一行(範例 port = 22)
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
重新啟動防火牆
#sudo /sbin/service iptables stop
#sudo /sbin/service iptables start
調整 SSH 設定
#vi /etc/ssh/sshd_config
禁止 root 通過 SSH 登入
PermitRootLogin no
重新啟動
vsftpd 2.2 in CentOS 6.3
安裝 vsftpd
#yum install vsftpd
設定開機啟動 vsftpd ftp
#chkconfig vsftpd on
啟動服務
#service vsftpd start|restart|stop
修改 server port(注意防火牆設定是否完成)
#vi /etc/vsftpd/vsftpd.conf
在最後一行的地方加上: listen_port=21
新增 ftp 使用者
#vi /etc/vsftpd/vsftpd.conf
拿掉以下兩個註解:
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
增加使用者 ftpuser,指向路徑 /home/wwwroot/ftpuser, 禁止使用 SSH 權限
#useradd -d /home/wwwroot/ftpuser -g ftp -s /sbin/nologin ftpuser
(wwwroot需要先用 mkdir 的方式建立)
修改密碼
#passwd ftpuser
編輯文件chroot_list:
#vi /etc/vsftpd/chroot_list
內容為 ftp 帳號,每個帳號都佔一行:
jeff
nina
登入 ftp 後可轉換至個人目錄
#setsebool -P ftp_home_dir on
配置防火牆
編輯設置文件
#vi /etc/sysconfig/iptables
在REJECT行之前加上以下指令(範例是將 21 port 在防火牆開啟)
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
重新啟動防火牆
#service iptables start
2012/10/11
Bluetooth Support Service Setting
Bluetooth Support Service Setting
Part 1 of the solution is buried in this Microsoft Knowledgebase article:
And I quote:
How to make sure that the Bluetooth service is started
- Open the Microsoft Management Console (MMC) snap-in for Services. To do this, follow these steps.
Windows Vista or Windows 7
- Click Start
, copy and then paste (or type) the following command in the Start Search box, and then press ENTER: services.msc
- In the Programs list, click Services.
If you are prompted for an administrator password or for confirmation, type the password, or click Continue.Windows XP
- Click Start, and then click Run.
- Copy and then paste (or type) the following command in the Open box, and then press ENTER: services.msc
- Double-click the Bluetooth Support service.
- If the Bluetooth Support service is stopped, click Start.
- On the Startup type list, click Automatic.
- Click the Log On tab.
- Click Local System account.
- Click OK.
- If you prompted to restart the computer, click Yes.
My log on settings were okay, but my Startup Type was set to “Manual” rather than “Automatic”. I changed it, like so:
Bluetooth Power Management Setting
But sadly, my problem wasn’t solved. So then I tried something else. I opened up Device Manager, expanded “Bluetooth Radios”, and double-clicked on the device to open its Properties page – not the enumerator, the device.
Double click the device (highlighted), not the enumerator
Go to the Power Management page and clear the checkbox “Allow the computer to turn off this device to save power”. And finally, relief! No more disconnects. Apparently there is a bug in the power management of the Bluetooth driver under Windows 7.
Uncheck 'Allow the computer to turn off this device to save power'
I can’t say for sure that the first step of making the Bluetooth Support Service automatic is necessary, or just turning off power management would fix it. It doesn’t hurt to change it to automatic so I didn’t test this. If you test it, post your results. Are both changes needed, or do you just need to turn off power management to stop losing connection?
文章來自這裡
訂閱:
文章 (Atom)
NGINX SSL/設定檔案
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #...
-
有時候,我們想要使用的軟體並沒有被包含到 Ubuntu 的套件中,而程式本身也沒有提供讓 Ubuntu 可以使用的 deb 包,你又不願意從程式碼編譯。但假如軟體提供有 rpm 包的話,我們也是可以在 Ubuntu 中安裝的。 方法一: 1. 先安裝 alien 和 fakero...
-
我想去澳洲遊學打工, 是說我也工作五年了, 我要再想要怎樣可以保持有收入的狀況過去, 去澳洲打工度假, 打工性質的工作多半是服務員, 或是出力的那種工作, 說實話我不太想要有那種工作, 畢竟我身體沒辦法讓我一直搬重物, 並不是因為我懶惰, 是因為身體希望我可以去做...
-
程式與香雞排/蔡學鏞 當程式員很可憐,在台灣當程式員尤其可憐。薪資低、工作量大、 地位不高、技術又容易被淘汰。難怪有人半開玩笑地告訴我, 他以後不寫程式要改行去賣香雞排。 照理說,軟體開發是很專業的領域,越是專業的領域, 越是處於金字塔的尖端,應該薪資很不錯才是,但不知怎地, 台...