How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH) If you want to setup an account on your system that will be used only to transfer files (and not to ssh to the system), you should setup SFTP Chroot Jail as explained in this article. In a typical sftp scenario (when chroot sftp is not setup), if you use sftp, you can see root’s file as shown below. If you want to give sftp access on your system to outside vendors to transfer files, you should not use standard sftp. Instead, you should setup Chroot SFTP Jail as explained below. Non-Chroot SFTP Environment In the following example (a typical sftp environment), john can sftp to the system, and view /etc folder and download the files from there. # sftp email@example.com john@thegeekstuff's password: sftp> pwd Remote working directory: /home/john sftp> ls projects john.txt documents sftp> cd /etc sftp> ls -l passwd -rw-r--r-- 0 0 0 3750 Dec 29 23:09 passwd sftp> get passwd Fetching /etc/passwd to passwd /etc/passwd 100% 3750 3.7KB/s 00:00 Chroot SFTP Environment.
Top command usages and examples in Unix/Linux. Top command has an important role in Unix/Linux Administration side.
The command “top” displays a dynamic view of process that are currently running under the system. Here I’m explaining some of the useful usage of top command for My Admin Friends. Top command is simple in usage and very interesting also. The simple top command output is shown below.1. top An important thing is we can observer the dynamic view of Load Average from “top” command and also uptime, total users logged in to the system, cpu & free memory details etc.. 2. 3. top command’s output field description. PID : Process ID. 4. Immediately updates the display. 4.2 h or ? This will display the help page (q for quit). 4.3 k : For kill a process. In the image change PROCESS ID with the pid of process which you want to kill.4.4 i Ignore idle and zombie processes. 4.5 I (shift i) Toggle between Solaris (CPU percentage divided by total number of CPUs) and Irix (CPU percentage calculated solely by amount of time) views. 4.6 n or #
Linux FSTAB file explained. The first and second columns should be pretty straightforward.
They tell thewhen you mount stuff manually: what is the device or partition, and what is the mount point. The mount point specified for a device inis its default mount point. Thatis the directory where the device will be mounted if you don't specify any other mount point when mounting the device. Most Linux distros create special directories for mount points. Most distros create them under /mnt, but some under /media. ... my floppy will be mounted in /media/floppy, because that's the default mount point specified in /etc/fstab.
Some partitions and devices are also automatically mounted when your Linux system boots up. As you've learned, these lines mean that /dev/hda2 will be mounted to / and /dev/hdb1to /home. The third column in /etc/fstab specifies the filesystem type of the device or partition. ReiserFS: Your Linux partitions may very well be formatted as ReiserFS. Swap:The filesystem name is self-explanatory.