tailieunhanh - Automating Linux and Unix System Administration Second Edition phần 2

Bản chất thin-client của các thiết bị điện thoại thông minh có nghĩa là họ thường xuyên nói chuyện với máy chủ khác nhau để truy cập thông tin. Khi đi qua các dữ liệu nhạy cảm trên mạng, đặc biệt là một mạng không dây, nó là vô cùng quan trọng để bảo đảm thông tin liên lạc ở cả hai đầu. | 28 CHAPTER 3 USING SSH TO AUTOMATE SYSTEM ADMINISTRATION SECURELY Learning the Basics of Using SSH If you are already familiar with the basic use of SSH you might want to skim this section. If on the other hand you are an SSH novice you are in for quite a surprise. You ll find that SSH is easy and efficient to use and that it can help with a wide variety of tasks. The commands in this section work fine without any setup assuming you have the SSH daemon running on the remote host . If nothing has been configured all of these commands use password authentication just like Telnet except with SSH the password and all traffic is sent over an encrypted connection. Use this command to initiate a connection to any machine as any user and to start an interactive shell ssh userghost You can also execute any command in lieu of starting an interactive shell. This code displays memory usage information on the remote host ssh userghost free total used free shared buffers cached Mem 126644 122480 4164 1164 29904 36300 - buffers cache 56276 70368 Swap 514072 10556 503516 Finally the scp command allows you to copy files between hosts using the SSH protocol. The syntax resembles the standard cp command but if a file name contains a colon it is a remote file instead of a local file. As with the standard ssh command if no username is specified on the command line your current username is used. If no path is specified after the colon the user s home directory is used as the source or destination directory. Here are a few examples scp local_file userghost tmp remote_file scp userghost tmp remote_file local_file scp userlghostl file user2ghost2 The last example copies the file named file from user1 s home directory on host1 directly into user2 s home directory on host2. No file name is given in the second argument so the original file name is used file in this case . CHAPTER 3 USING SSH TO AUTOMATE SYSTEM ADMINISTRATION SECURELY 29 Enhancing Security with SSH Before SSH the telnet .

TỪ KHÓA LIÊN QUAN