Apress - Smart Home Automation with Linux (2010)- P33

Apress - Smart Home Automation with Linux (2010)- P33:Linux users can now control their homes remotely! Are you a Linux user who has ever wanted to turn on the lights in your house, or open and close the curtains, while away on holiday? Want to be able to play the same music in every room, controlled from your laptop or mobile phone? Do you want to do these things without an expensive off-the-shelf kit | CHAPTER 4 HOME IS HOME rsync -a code steev@ backup daily I recover them for testing8 with this rsync -a steev@ backup daily code The options here perform a recursive update while maintaining all symlinks permissions and user settings and is the most typical in home situations. The manual pages detail other possibilities. rsync does have two problems however. The first is that it s available primarily for Unix-oriented platforms. Versions are available for Windows such as DeltaCopy and the version with Cygwin but they take a little while to set up and can be tricky. The second issue is that it requires a password to be interactively given in order to log in to the remote site. This is a nuisance and prevents any kind of automatic backup. For a remote site to allow a user to connect without a password they must first establish an alternative form of trust in this case the exchange of public keys. To copy from machine A to machine B B must have a copy of A s public key. To copy from machine B to machine A A must have a copy of B s public key. In our case machine A is at home with our files while B is a remote machine for backup. So our home machine must generate a key for the user who ll be doing the copying. ssh-keygen -t rsa which by default can be found in .ssh . This is then copied to the remote machine perhaps using a password-directed rsync and appended to the list of authorized keys that the remote user will accept cat .ssh authorized_keys Once this is done you should be able to rsync without a password rsync -a --bwlimit 100 steev@ backup daily code Note that this limits the bandwidth with the bwlimit argument to 100 kilobytes per second so that other applications can make use of the Internet since rsync and ssh are rather greedy when teamed up together. One potential administration problem that can exist here is for the home user to be refused a connection because the .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.