mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-09 01:30:10 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
244d34345b
@ -1,209 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (MjSeven)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (How To Create SSH Alias In Linux)
|
|
||||||
[#]: via: (https://www.ostechnix.com/how-to-create-ssh-alias-in-linux/)
|
|
||||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
|
||||||
|
|
||||||
How To Create SSH Alias In Linux
|
|
||||||
======
|
|
||||||
|
|
||||||
![How To Create SSH Alias In Linux][1]
|
|
||||||
|
|
||||||
If you frequently access a lot of different remote systems via SSH, this trick will save you some time. You can create SSH alias to frequently-accessed systems via SSH. This way you need not to remember all the different usernames, hostnames, ssh port numbers and IP addresses etc. Additionally, It avoids the need to repetitively type the same username/hostname, ip address, port no whenever you SSH into a Linux server(s).
|
|
||||||
|
|
||||||
### Create SSH Alias In Linux
|
|
||||||
|
|
||||||
Before I know this trick, usually, I connect to a remote system over SSH using anyone of the following ways.
|
|
||||||
|
|
||||||
Using IP address:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ssh 192.168.225.22
|
|
||||||
```
|
|
||||||
|
|
||||||
Or using port number, username and IP address:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ssh -p 22 sk@server.example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
Or using port number, username and hostname:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ssh -p 22 sk@server.example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
Here,
|
|
||||||
|
|
||||||
* **22** is the port number,
|
|
||||||
* **sk** is the username of the remote system,
|
|
||||||
* **192.168.225.22** is the IP of my remote system,
|
|
||||||
* **server.example.com** is the hostname of remote system.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
I believe most of the newbie Linux users and/or admins would SSH into a remote system this way. However, If you SSH into multiple different systems, remembering all hostnames/ip addresses, usernames is bit difficult unless you write them down in a paper or save them in a text file. No worries! This can be easily solved by creating an alias(or shortcut) for SSH connections.
|
|
||||||
|
|
||||||
We can create an alias for SSH commands in two methods.
|
|
||||||
|
|
||||||
##### Method 1 – Using SSH Config File
|
|
||||||
|
|
||||||
This is my preferred way of creating aliases.
|
|
||||||
|
|
||||||
We can use SSH default configuration file to create SSH alias. To do so, edit **~/.ssh/config** file (If this file doesn’t exist, just create one):
|
|
||||||
|
|
||||||
```
|
|
||||||
$ vi ~/.ssh/config
|
|
||||||
```
|
|
||||||
|
|
||||||
Add all of your remote hosts details like below:
|
|
||||||
|
|
||||||
```
|
|
||||||
Host webserver
|
|
||||||
HostName 192.168.225.22
|
|
||||||
User sk
|
|
||||||
|
|
||||||
Host dns
|
|
||||||
HostName server.example.com
|
|
||||||
User root
|
|
||||||
|
|
||||||
Host dhcp
|
|
||||||
HostName 192.168.225.25
|
|
||||||
User ostechnix
|
|
||||||
Port 2233
|
|
||||||
```
|
|
||||||
|
|
||||||
![][2]
|
|
||||||
|
|
||||||
Create SSH Alias In Linux Using SSH Config File
|
|
||||||
|
|
||||||
Replace the values of **Host** , **Hostname** , **User** and **Port** with your own. Once you added the details of all remote hosts, save and exit the file.
|
|
||||||
|
|
||||||
Now you can SSH into the systems with commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ssh webserver
|
|
||||||
|
|
||||||
$ ssh dns
|
|
||||||
|
|
||||||
$ ssh dhcp
|
|
||||||
```
|
|
||||||
|
|
||||||
It is simple as that.
|
|
||||||
|
|
||||||
Have a look at the following screenshot.
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
Access remote system using SSH alias
|
|
||||||
|
|
||||||
See? I only used the alias name (i.e **webserver** ) to access my remote system that has IP address **192.168.225.22**.
|
|
||||||
|
|
||||||
Please note that this applies for current user only. If you want to make the aliases available for all users (system wide), add the above lines in **/etc/ssh/ssh_config** file.
|
|
||||||
|
|
||||||
You can also add plenty of other things in the SSH config file. For example, if you have [**configured SSH Key-based authentication**][4], mention the SSH keyfile location as below.
|
|
||||||
|
|
||||||
```
|
|
||||||
Host ubuntu
|
|
||||||
HostName 192.168.225.50
|
|
||||||
User senthil
|
|
||||||
IdentityFIle ~/.ssh/id_rsa_remotesystem
|
|
||||||
```
|
|
||||||
|
|
||||||
Make sure you have replace the hostname, username and SSH keyfile path with your own.
|
|
||||||
|
|
||||||
Now connect to the remote server with command:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ssh ubuntu
|
|
||||||
```
|
|
||||||
|
|
||||||
This way you can add as many as remote hosts you want to access over SSH and quickly access them using their alias name.
|
|
||||||
|
|
||||||
##### Method 2 – Using Bash aliases
|
|
||||||
|
|
||||||
This is quick and dirty way to create SSH aliases for faster communication. You can use the [**alias command**][5] to make this task much easier.
|
|
||||||
|
|
||||||
Open **~/.bashrc** or **~/.bash_profile** file:
|
|
||||||
|
|
||||||
Add aliases for each SSH connections one by one like below.
|
|
||||||
|
|
||||||
```
|
|
||||||
alias webserver='ssh sk@server.example.com'
|
|
||||||
alias dns='ssh sk@server.example.com'
|
|
||||||
alias dhcp='ssh sk@server.example.com -p 2233'
|
|
||||||
alias ubuntu='ssh sk@server.example.com -i ~/.ssh/id_rsa_remotesystem'
|
|
||||||
```
|
|
||||||
|
|
||||||
Again make sure you have replaced the host, hostname, port number and ip address with your own. Save the file and exit.
|
|
||||||
|
|
||||||
Then, apply the changes using command:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ source ~/.bashrc
|
|
||||||
```
|
|
||||||
|
|
||||||
Or,
|
|
||||||
|
|
||||||
```
|
|
||||||
$ source ~/.bash_profile
|
|
||||||
```
|
|
||||||
|
|
||||||
In this method, you don’t even need to use “ssh alias-name” command. Instead, just use alias name only like below.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ webserver
|
|
||||||
$ dns
|
|
||||||
$ dhcp
|
|
||||||
$ ubuntu
|
|
||||||
```
|
|
||||||
|
|
||||||
![][6]
|
|
||||||
|
|
||||||
These two methods are very simple, yet useful and much more convenient for those who often SSH into multiple different systems. Use any one of the aforementioned methods that suits for you to quickly access your remote Linux systems over SSH.
|
|
||||||
|
|
||||||
* * *
|
|
||||||
|
|
||||||
**Suggested read:**
|
|
||||||
|
|
||||||
* [**Allow Or Deny SSH Access To A Particular User Or Group In Linux**][7]
|
|
||||||
* [**How To SSH Into A Particular Directory On Linux**][8]
|
|
||||||
* [**How To Stop SSH Session From Disconnecting In Linux**][9]
|
|
||||||
* [**4 Ways To Keep A Command Running After You Log Out Of The SSH Session**][10]
|
|
||||||
* [**SSLH – Share A Same Port For HTTPS And SSH**][11]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * *
|
|
||||||
|
|
||||||
And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned!
|
|
||||||
|
|
||||||
Cheers!
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.ostechnix.com/how-to-create-ssh-alias-in-linux/
|
|
||||||
|
|
||||||
作者:[sk][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[MjSeven](https://github.com/MjSeven)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.ostechnix.com/author/sk/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/ssh-alias-720x340.png
|
|
||||||
[2]: http://www.ostechnix.com/wp-content/uploads/2019/04/Create-SSH-Alias-In-Linux.png
|
|
||||||
[3]: http://www.ostechnix.com/wp-content/uploads/2019/04/create-ssh-alias.png
|
|
||||||
[4]: https://www.ostechnix.com/configure-ssh-key-based-authentication-linux/
|
|
||||||
[5]: https://www.ostechnix.com/the-alias-and-unalias-commands-explained-with-examples/
|
|
||||||
[6]: http://www.ostechnix.com/wp-content/uploads/2019/04/create-ssh-alias-1.png
|
|
||||||
[7]: https://www.ostechnix.com/allow-deny-ssh-access-particular-user-group-linux/
|
|
||||||
[8]: https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/
|
|
||||||
[9]: https://www.ostechnix.com/how-to-stop-ssh-session-from-disconnecting-in-linux/
|
|
||||||
[10]: https://www.ostechnix.com/4-ways-keep-command-running-log-ssh-session/
|
|
||||||
[11]: https://www.ostechnix.com/sslh-share-port-https-ssh/
|
|
432
sources/tech/20190510 Check storage performance with dd.md
Normal file
432
sources/tech/20190510 Check storage performance with dd.md
Normal file
@ -0,0 +1,432 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Check storage performance with dd)
|
||||||
|
[#]: via: (https://fedoramagazine.org/check-storage-performance-with-dd/)
|
||||||
|
[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
|
||||||
|
|
||||||
|
Check storage performance with dd
|
||||||
|
======
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
This article includes some example commands to show you how to get a _rough_ estimate of hard drive and RAID array performance using the _dd_ command. Accurate measurements would have to take into account things like [write amplification][2] and [system call overhead][3], which this guide does not. For a tool that might give more accurate results, you might want to consider using [hdparm][4].
|
||||||
|
|
||||||
|
To factor out performance issues related to the file system, these examples show how to test the performance of your drives and arrays at the block level by reading and writing directly to/from their block devices. **WARNING** : The _write_ tests will destroy any data on the block devices against which they are run. **Do not run them against any device that contains data you want to keep!**
|
||||||
|
|
||||||
|
### Four tests
|
||||||
|
|
||||||
|
Below are four example dd commands that can be used to test the performance of a block device:
|
||||||
|
|
||||||
|
1. One process reading from $MY_DISK:
|
||||||
|
|
||||||
|
```
|
||||||
|
# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
|
||||||
|
```
|
||||||
|
|
||||||
|
2. One process writing to $MY_DISK:
|
||||||
|
|
||||||
|
```
|
||||||
|
# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Two processes reading concurrently from $MY_DISK:
|
||||||
|
|
||||||
|
```
|
||||||
|
# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Two processes writing concurrently to $MY_DISK:
|
||||||
|
|
||||||
|
```
|
||||||
|
# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
– The _iflag=nocache_ and _oflag=direct_ parameters are important when performing the read and write tests (respectively) because without them the dd command will sometimes show the resulting speed of transferring the data to/from [RAM][5] rather than the hard drive.
|
||||||
|
|
||||||
|
– The values for the _bs_ and _count_ parameters are somewhat arbitrary and what I have chosen should be large enough to provide a decent average in most cases for current hardware.
|
||||||
|
|
||||||
|
– The _null_ and _zero_ devices are used for the destination and source (respectively) in the read and write tests because they are fast enough that they will not be the limiting factor in the performance tests.
|
||||||
|
|
||||||
|
– The _skip=200_ parameter on the second dd command in the concurrent read and write tests is to ensure that the two copies of dd are operating on different areas of the hard drive.
|
||||||
|
|
||||||
|
### 16 examples
|
||||||
|
|
||||||
|
Below are demonstrations showing the results of running each of the above four tests against each of the following four block devices:
|
||||||
|
|
||||||
|
1. MY_DISK=/dev/sda2 (used in examples 1-X)
|
||||||
|
2. MY_DISK=/dev/sdb2 (used in examples 2-X)
|
||||||
|
3. MY_DISK=/dev/md/stripped (used in examples 3-X)
|
||||||
|
4. MY_DISK=/dev/md/mirrored (used in examples 4-X)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
A video demonstration of the these tests being run on a PC is provided at the end of this guide.
|
||||||
|
|
||||||
|
Begin by putting your computer into _rescue_ mode to reduce the chances that disk I/O from background services might randomly affect your test results. **WARNING** : This will shutdown all non-essential programs and services. Be sure to save your work before running these commands. You will need to know your _root_ password to get into rescue mode. The _passwd_ command, when run as the root user, will prompt you to (re)set your root account password.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo -i
|
||||||
|
# passwd
|
||||||
|
# setenforce 0
|
||||||
|
# systemctl rescue
|
||||||
|
```
|
||||||
|
|
||||||
|
You might also want to temporarily disable logging to disk:
|
||||||
|
|
||||||
|
```
|
||||||
|
# sed -r -i.bak 's/^#?Storage=.*/Storage=none/' /etc/systemd/journald.conf
|
||||||
|
# systemctl restart systemd-journald.service
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have a swap device, it can be temporarily disabled and used to perform the following tests:
|
||||||
|
|
||||||
|
```
|
||||||
|
# swapoff -a
|
||||||
|
# MY_DEVS=$(mdadm --detail /dev/md/swap | grep active | grep -o "/dev/sd.*")
|
||||||
|
# mdadm --stop /dev/md/swap
|
||||||
|
# mdadm --zero-superblock $MY_DEVS
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 1-1 (reading from sda)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
|
||||||
|
# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.7003 s, 123 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 1-2 (writing to sda)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
|
||||||
|
# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.67117 s, 125 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 1-3 (reading concurrently from sda)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
|
||||||
|
# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.42875 s, 61.2 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.52614 s, 59.5 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 1-4 (writing concurrently to sda)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 1)
|
||||||
|
# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.2435 s, 64.7 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.60872 s, 58.1 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 2-1 (reading from sdb)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
|
||||||
|
# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.67285 s, 125 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 2-2 (writing to sdb)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
|
||||||
|
# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.67198 s, 125 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 2-3 (reading concurrently from sdb)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
|
||||||
|
# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.52808 s, 59.4 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.57736 s, 58.6 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 2-4 (writing concurrently to sdb)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=$(echo $MY_DEVS | cut -d ' ' -f 2)
|
||||||
|
# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.7841 s, 55.4 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 3.81475 s, 55.0 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 3-1 (reading from RAID0)
|
||||||
|
|
||||||
|
```
|
||||||
|
# mdadm --create /dev/md/stripped --homehost=any --metadata=1.0 --level=0 --raid-devices=2 $MY_DEVS
|
||||||
|
# MY_DISK=/dev/md/stripped
|
||||||
|
# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 0.837419 s, 250 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 3-2 (writing to RAID0)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=/dev/md/stripped
|
||||||
|
# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 0.823648 s, 255 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 3-3 (reading concurrently from RAID0)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=/dev/md/stripped
|
||||||
|
# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.31025 s, 160 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.80016 s, 116 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 3-4 (writing concurrently to RAID0)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=/dev/md/stripped
|
||||||
|
# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.65026 s, 127 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.81323 s, 116 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 4-1 (reading from RAID1)
|
||||||
|
|
||||||
|
```
|
||||||
|
# mdadm --stop /dev/md/stripped
|
||||||
|
# mdadm --create /dev/md/mirrored --homehost=any --metadata=1.0 --level=1 --raid-devices=2 --assume-clean $MY_DEVS
|
||||||
|
# MY_DISK=/dev/md/mirrored
|
||||||
|
# dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.74963 s, 120 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 4-2 (writing to RAID1)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=/dev/md/mirrored
|
||||||
|
# dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.74625 s, 120 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 4-3 (reading concurrently from RAID1)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=/dev/md/mirrored
|
||||||
|
# (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache &); (dd if=$MY_DISK of=/dev/null bs=1MiB count=200 iflag=nocache skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.67171 s, 125 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 1.67685 s, 125 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example 4-4 (writing concurrently to RAID1)
|
||||||
|
|
||||||
|
```
|
||||||
|
# MY_DISK=/dev/md/mirrored
|
||||||
|
# (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct &); (dd if=/dev/zero of=$MY_DISK bs=1MiB count=200 oflag=direct skip=200 &)
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 4.09666 s, 51.2 MB/s
|
||||||
|
200+0 records in
|
||||||
|
200+0 records out
|
||||||
|
209715200 bytes (210 MB, 200 MiB) copied, 4.1067 s, 51.1 MB/s
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Restore your swap device and journald configuration
|
||||||
|
|
||||||
|
```
|
||||||
|
# mdadm --stop /dev/md/stripped /dev/md/mirrored
|
||||||
|
# mdadm --create /dev/md/swap --homehost=any --metadata=1.0 --level=1 --raid-devices=2 $MY_DEVS
|
||||||
|
# mkswap /dev/md/swap
|
||||||
|
# swapon -a
|
||||||
|
# mv /etc/systemd/journald.conf.bak /etc/systemd/journald.conf
|
||||||
|
# systemctl restart systemd-journald.service
|
||||||
|
# reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
### Interpreting the results
|
||||||
|
|
||||||
|
Examples 1-1, 1-2, 2-1, and 2-2 show that each of my drives read and write at about 125 MB/s.
|
||||||
|
|
||||||
|
Examples 1-3, 1-4, 2-3, and 2-4 show that when two reads or two writes are done in parallel on the same drive, each process gets at about half the drive’s bandwidth (60 MB/s).
|
||||||
|
|
||||||
|
The 3-x examples show the performance benefit of putting the two drives together in a RAID0 (data stripping) array. The numbers, in all cases, show that the RAID0 array performs about twice as fast as either drive is able to perform on its own. The trade-off is that you are twice as likely to lose everything because each drive only contains half the data. A three-drive array would perform three times as fast as a single drive (all drives being equal) but it would be thrice as likely to suffer a [catastrophic failure][6].
|
||||||
|
|
||||||
|
The 4-x examples show that the performance of the RAID1 (data mirroring) array is similar to that of a single disk except for the case where multiple processes are concurrently reading (example 4-3). In the case of multiple processes reading, the performance of the RAID1 array is similar to that of the RAID0 array. This means that you will see a performance benefit with RAID1, but only when processes are reading concurrently. For example, if a process tries to access a large number of files in the background while you are trying to use a web browser or email client in the foreground. The main benefit of RAID1 is that your data is unlikely to be lost [if a drive fails][7].
|
||||||
|
|
||||||
|
### Video demo
|
||||||
|
|
||||||
|
Testing storage throughput using dd
|
||||||
|
|
||||||
|
### Troubleshooting
|
||||||
|
|
||||||
|
If the above tests aren’t performing as you expect, you might have a bad or failing drive. Most modern hard drives have built-in Self-Monitoring, Analysis and Reporting Technology ([SMART][8]). If your drive supports it, the _smartctl_ command can be used to query your hard drive for its internal statistics:
|
||||||
|
|
||||||
|
```
|
||||||
|
# smartctl --health /dev/sda
|
||||||
|
# smartctl --log=error /dev/sda
|
||||||
|
# smartctl -x /dev/sda
|
||||||
|
```
|
||||||
|
|
||||||
|
Another way that you might be able to tune your PC for better performance is by changing your [I/O scheduler][9]. Linux systems support several I/O schedulers and the current default for Fedora systems is the [multiqueue][10] variant of the [deadline][11] scheduler. The default performs very well overall and scales extremely well for large servers with many processors and large disk arrays. There are, however, a few more specialized schedulers that might perform better under certain conditions.
|
||||||
|
|
||||||
|
To view which I/O scheduler your drives are using, issue the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ for i in /sys/block/sd?/queue/scheduler; do echo "$i: $(<$i)"; done
|
||||||
|
```
|
||||||
|
|
||||||
|
You can change the scheduler for a drive by writing the name of the desired scheduler to the /sys/block/<device name>/queue/scheduler file:
|
||||||
|
|
||||||
|
```
|
||||||
|
# echo bfq > /sys/block/sda/queue/scheduler
|
||||||
|
```
|
||||||
|
|
||||||
|
You can make your changes permanent by creating a [udev rule][12] for your drive. The following example shows how to create a udev rule that will set all [rotational drives][13] to use the [BFQ][14] I/O scheduler:
|
||||||
|
|
||||||
|
```
|
||||||
|
# cat << END > /etc/udev/rules.d/60-ioscheduler-rotational.rules
|
||||||
|
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
|
||||||
|
END
|
||||||
|
```
|
||||||
|
|
||||||
|
Here is another example that sets all [solid-state drives][15] to use the [NOOP][16] I/O scheduler:
|
||||||
|
|
||||||
|
```
|
||||||
|
# cat << END > /etc/udev/rules.d/60-ioscheduler-solid-state.rules
|
||||||
|
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
|
||||||
|
END
|
||||||
|
```
|
||||||
|
|
||||||
|
Changing your I/O scheduler won’t affect the raw throughput of your devices, but it might make your PC seem more responsive by prioritizing the bandwidth for the foreground tasks over the background tasks or by eliminating unnecessary block reordering.
|
||||||
|
|
||||||
|
* * *
|
||||||
|
|
||||||
|
_Photo by _[ _James Donovan_][17]_ on _[_Unsplash_][18]_._
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://fedoramagazine.org/check-storage-performance-with-dd/
|
||||||
|
|
||||||
|
作者:[Gregory Bartholomew][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://fedoramagazine.org/author/glb/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/dd-performance-816x345.jpg
|
||||||
|
[2]: https://www.ibm.com/developerworks/community/blogs/ibmnas/entry/misalignment_can_be_twice_the_cost1?lang=en
|
||||||
|
[3]: https://eklitzke.org/efficient-file-copying-on-linux
|
||||||
|
[4]: https://en.wikipedia.org/wiki/Hdparm
|
||||||
|
[5]: https://en.wikipedia.org/wiki/Random-access_memory
|
||||||
|
[6]: https://blog.elcomsoft.com/2019/01/why-ssds-die-a-sudden-death-and-how-to-deal-with-it/
|
||||||
|
[7]: https://www.computerworld.com/article/2484998/ssds-do-die--as-linus-torvalds-just-discovered.html
|
||||||
|
[8]: https://en.wikipedia.org/wiki/S.M.A.R.T.
|
||||||
|
[9]: https://en.wikipedia.org/wiki/I/O_scheduling
|
||||||
|
[10]: https://lwn.net/Articles/552904/
|
||||||
|
[11]: https://en.wikipedia.org/wiki/Deadline_scheduler
|
||||||
|
[12]: http://www.reactivated.net/writing_udev_rules.html
|
||||||
|
[13]: https://en.wikipedia.org/wiki/Hard_disk_drive_performance_characteristics
|
||||||
|
[14]: http://algo.ing.unimo.it/people/paolo/disk_sched/
|
||||||
|
[15]: https://en.wikipedia.org/wiki/Solid-state_drive
|
||||||
|
[16]: https://en.wikipedia.org/wiki/Noop_scheduler
|
||||||
|
[17]: https://unsplash.com/photos/0ZBRKEG_5no?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||||
|
[18]: https://unsplash.com/search/photos/speed?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
@ -0,0 +1,112 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How to Use 7Zip in Ubuntu and Other Linux [Quick Tip])
|
||||||
|
[#]: via: (https://itsfoss.com/use-7zip-ubuntu-linux/)
|
||||||
|
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||||
|
|
||||||
|
How to Use 7Zip in Ubuntu and Other Linux [Quick Tip]
|
||||||
|
======
|
||||||
|
|
||||||
|
_**Brief: Cannot extract .7z file in Linux? Learn how to install and use 7zip in Ubuntu and other Linux distributions.**_
|
||||||
|
|
||||||
|
[7Zip][1] (properly written as 7-Zip) is an archive format hugely popular among Windows users. A 7Zip archive file usually ends in .7z extension. It’s mostly an open source software barring a few part of the code that deals with unRAR.
|
||||||
|
|
||||||
|
The 7Zip support is not enabled by default in most Linux distributions. If you try to extract it, you may see this error:
|
||||||
|
|
||||||
|
_**Could not open this file type
|
||||||
|
There is no command installed for 7-zip archive files. Do you want to search for a command to open this file?**_
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
Don’t worry, you can easily install 7zip in Ubuntu or other Linux distributions.
|
||||||
|
|
||||||
|
The one problem you’ll notice if you try to use the [apt-get install command][3], you’ll see that there are no installation candidate that starts with 7zip. It’s because the 7Zip package in Linux is named [p7zip][4]., start with letter ‘p’ instead of the expected number ‘7’.
|
||||||
|
|
||||||
|
Let’s see how to install 7zip in Ubuntu and (possibly) other distributions.
|
||||||
|
|
||||||
|
### Install 7Zip in Ubuntu Linux
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
First thing you need is to install the p7zip package. You’ll find three 7zip packages in Ubuntu: p7zip, p7zip-full and p7zip-rar.
|
||||||
|
|
||||||
|
The difference between p7zip and p7zip-full is that p7zip is a lighter version providing support only for .7z while the full version provides support for more 7z compression algorithms (for audio files etc).
|
||||||
|
|
||||||
|
The p7zip-rar package provides support for [RAR files][6] along with 7z.
|
||||||
|
|
||||||
|
Installing p7zip-full should be sufficient in most cases but you may also install p7zip-rar for additional support for the rar file.
|
||||||
|
|
||||||
|
p7zip packages are in the [universe repository in Ubuntu][7] so make sure that you have enabled it using this command:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo add-apt-repository universe
|
||||||
|
sudo apt update
|
||||||
|
```
|
||||||
|
|
||||||
|
Use the following command to install 7zip support in Ubuntu and Debian based distributions.
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install p7zip-full p7zip-rar
|
||||||
|
```
|
||||||
|
|
||||||
|
That’s good. Now you have 7zip archive support in your system.
|
||||||
|
|
||||||
|
[][8]
|
||||||
|
|
||||||
|
Suggested read Easily Share Files Between Linux, Windows And Mac Using NitroShare
|
||||||
|
|
||||||
|
### Extract 7Zip archive file in Linux
|
||||||
|
|
||||||
|
With 7Zip installed, you can either use the GUI or the command line to extract 7zip files in Linux.
|
||||||
|
|
||||||
|
In GUI, you can extract a .7z file as you extract any other compressed file. You right click on the file and proceed to extract it.
|
||||||
|
|
||||||
|
In terminal, you can extract a .7z archive file using this command:
|
||||||
|
|
||||||
|
```
|
||||||
|
7z e file.7z
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compress a file in 7zip archive format in Linux
|
||||||
|
|
||||||
|
You can compress a file in 7zip archive format graphically. Simply right click on the file/directory, and select **Compress**. You should see several types of archive format options. Choose .7z for 7zip.
|
||||||
|
|
||||||
|
![7zip Archive Ubuntu][9]
|
||||||
|
|
||||||
|
Alternatively, you can also use the command line. Here’s the command that you can use for this purpose:
|
||||||
|
|
||||||
|
```
|
||||||
|
7z a OutputFile files_to_compress
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, the archived file will have .7z extension. You can compress the file in zip format by specifying the extension (.zip) of the output file.
|
||||||
|
|
||||||
|
**Conclusion**
|
||||||
|
|
||||||
|
That’s it. See, how easy it is to use 7zip in Linux? I hope you liked this quick tip. If you have questions or suggestions, feel free to let me know the comment sections.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/use-7zip-ubuntu-linux/
|
||||||
|
|
||||||
|
作者:[Abhishek Prakash][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/abhishek/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.7-zip.org/
|
||||||
|
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2015/07/Install_7zip_ubuntu_1.png?ssl=1
|
||||||
|
[3]: https://itsfoss.com/apt-get-linux-guide/
|
||||||
|
[4]: https://sourceforge.net/projects/p7zip/
|
||||||
|
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/05/7zip-linux.png?resize=800%2C450&ssl=1
|
||||||
|
[6]: https://itsfoss.com/use-rar-ubuntu-linux/
|
||||||
|
[7]: https://itsfoss.com/ubuntu-repositories/
|
||||||
|
[8]: https://itsfoss.com/easily-share-files-linux-windows-mac-nitroshare/
|
||||||
|
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/05/7zip-archive-ubuntu.png?resize=800%2C239&ssl=1
|
@ -0,0 +1,141 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How To Check Whether The Given Package Is Installed Or Not On Debian/Ubuntu System?)
|
||||||
|
[#]: via: (https://www.2daygeek.com/how-to-check-whether-the-given-package-is-installed-or-not-on-ubuntu-debian-system/)
|
||||||
|
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||||
|
|
||||||
|
How To Check Whether The Given Package Is Installed Or Not On Debian/Ubuntu System?
|
||||||
|
======
|
||||||
|
|
||||||
|
We have recently published an article about bulk package installation.
|
||||||
|
|
||||||
|
While doing that, i was struggled to get the installed package information and did a small google search and found few methods about it.
|
||||||
|
|
||||||
|
I would like to share it in our website so, that it will be helpful for others too.
|
||||||
|
|
||||||
|
There are numerous ways we can achieve this.
|
||||||
|
|
||||||
|
I have add seven ways to achieve this. However, you can choose the preferred method for you.
|
||||||
|
|
||||||
|
Those methods are listed below.
|
||||||
|
|
||||||
|
* **`apt-cache Command:`** apt-cache command is used to query the APT cache or package metadata.
|
||||||
|
* **`apt Command:`** APT is a powerful command-line tool for installing, downloading, removing, searching and managing packages on Debian based systems.
|
||||||
|
* **`dpkg-query Command:`** dpkg-query is a tool to query the dpkg database.
|
||||||
|
* **`dpkg Command:`** dpkg is a package manager for Debian based systems.
|
||||||
|
* **`which Command:`** The which command returns the full path of the executable that would have been executed when the command had been entered in terminal.
|
||||||
|
* **`whereis Command:`** The whereis command used to search the binary, source, and man page files for a given command.
|
||||||
|
* **`locate Command:`** locate command works faster than the find command because it uses updatedb database, whereas the find command searches in the real system.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Method-1 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using apt-cache Command?
|
||||||
|
|
||||||
|
apt-cache command is used to query the APT cache or package metadata from APT’s internal database.
|
||||||
|
|
||||||
|
It will search and display an information about the given package. It shows whether the package is installed or not, installed package version, source repository information.
|
||||||
|
|
||||||
|
The below output clearly showing that `nano` package has already installed in the system. Since installed part is showing the installed version of nano package.
|
||||||
|
|
||||||
|
```
|
||||||
|
# apt-cache policy nano
|
||||||
|
nano:
|
||||||
|
Installed: 2.9.3-2
|
||||||
|
Candidate: 2.9.3-2
|
||||||
|
Version table:
|
||||||
|
*** 2.9.3-2 500
|
||||||
|
500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
|
||||||
|
100 /var/lib/dpkg/status
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method-2 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using apt Command?
|
||||||
|
|
||||||
|
APT is a powerful command-line tool for installing, downloading, removing, searching and managing as well as querying information about packages as a low-level access to all features of the libapt-pkg library. It’s contains some less used command-line utilities related to package management.
|
||||||
|
|
||||||
|
```
|
||||||
|
# apt -qq list nano
|
||||||
|
nano/bionic,now 2.9.3-2 amd64 [installed]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method-3 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using dpkg-query Command?
|
||||||
|
|
||||||
|
dpkg-query is a tool to show information about packages listed in the dpkg database.
|
||||||
|
|
||||||
|
In the below output first column showing `ii`. It means, the given package has already installed in the system.
|
||||||
|
|
||||||
|
```
|
||||||
|
# dpkg-query --list | grep -i nano
|
||||||
|
ii nano 2.9.3-2 amd64 small, friendly text editor inspired by Pico
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method-4 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using dpkg Command?
|
||||||
|
|
||||||
|
DPKG stands for Debian Package is a tool to install, build, remove and manage Debian packages, but unlike other package management systems, it cannot automatically download and install packages or their dependencies.
|
||||||
|
|
||||||
|
In the below output first column showing `ii`. It means, the given package has already installed in the system.
|
||||||
|
|
||||||
|
```
|
||||||
|
# dpkg -l | grep -i nano
|
||||||
|
ii nano 2.9.3-2 amd64 small, friendly text editor inspired by Pico
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method-5 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using which Command?
|
||||||
|
|
||||||
|
The which command returns the full path of the executable that would have been executed when the command had been entered in terminal.
|
||||||
|
|
||||||
|
It’s very useful when you want to create a desktop shortcut or symbolic link for executable files.
|
||||||
|
|
||||||
|
Which command searches the directories listed in the current user’s PATH environment variable not for all the users. I mean, when you are logged in your own account and you can’t able to search for root user file or directory.
|
||||||
|
|
||||||
|
If the following output shows the given package binary or executable file location then the given package has already installed in the system. If not, the package is not installed in system.
|
||||||
|
|
||||||
|
```
|
||||||
|
# which nano
|
||||||
|
/bin/nano
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method-6 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using whereis Command?
|
||||||
|
|
||||||
|
The whereis command used to search the binary, source, and man page files for a given command.
|
||||||
|
|
||||||
|
If the following output shows the given package binary or executable file location then the given package has already installed in the system. If not, the package is not installed in system.
|
||||||
|
|
||||||
|
```
|
||||||
|
# whereis nano
|
||||||
|
nano: /bin/nano /usr/share/nano /usr/share/man/man1/nano.1.gz /usr/share/info/nano.info.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method-7 : How To Check Whether The Given Package Is Installed Or Not On Ubuntu System Using locate Command?
|
||||||
|
|
||||||
|
locate command works faster than the find command because it uses updatedb database, whereas the find command searches in the real system.
|
||||||
|
|
||||||
|
It uses a database rather than hunting individual directory paths to get a given file.
|
||||||
|
|
||||||
|
locate command doesn’t pre-installed in most of the distributions so, use your distribution package manager to install it.
|
||||||
|
|
||||||
|
The database is updated regularly through cron. Even, we can update it manually.
|
||||||
|
|
||||||
|
If the following output shows the given package binary or executable file location then the given package has already installed in the system. If not, the package is not installed in system.
|
||||||
|
|
||||||
|
```
|
||||||
|
# locate --basename '\nano'
|
||||||
|
/usr/bin/nano
|
||||||
|
/usr/share/nano
|
||||||
|
/usr/share/doc/nano
|
||||||
|
```
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.2daygeek.com/how-to-check-whether-the-given-package-is-installed-or-not-on-ubuntu-debian-system/
|
||||||
|
|
||||||
|
作者:[Magesh Maruthamuthu][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.2daygeek.com/author/magesh/
|
||||||
|
[b]: https://github.com/lujun9972
|
243
sources/tech/20190513 How To Set Password Complexity On Linux.md
Normal file
243
sources/tech/20190513 How To Set Password Complexity On Linux.md
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How To Set Password Complexity On Linux?)
|
||||||
|
[#]: via: (https://www.2daygeek.com/how-to-set-password-complexity-policy-on-linux/)
|
||||||
|
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||||
|
|
||||||
|
How To Set Password Complexity On Linux?
|
||||||
|
======
|
||||||
|
|
||||||
|
User management is one of the important task of Linux system administration.
|
||||||
|
|
||||||
|
There are many aspect is involved in this and implementing the strong password policy is one of them.
|
||||||
|
|
||||||
|
Navigate to the following URL, if you would like to **[generate a strong password on Linux][1]**.
|
||||||
|
|
||||||
|
It will Restrict unauthorized access to systems.
|
||||||
|
|
||||||
|
By default Linux is secure that everybody know. however, we need to make necessary tweak on this to make it more secure.
|
||||||
|
|
||||||
|
Insecure password will leads to breach security. So, take additional care on this.
|
||||||
|
|
||||||
|
Navigate to the following URL, if you would like to see the **[password strength and score][2]** of the generated strong password.
|
||||||
|
|
||||||
|
In this article, we will teach you, how to implement the best security policy on Linux.
|
||||||
|
|
||||||
|
We can use PAM (the “pluggable authentication module”) to enforce password policy On most Linux systems.
|
||||||
|
|
||||||
|
The file can be found in the following location.
|
||||||
|
|
||||||
|
For Redhat based systems @ `/etc/pam.d/system-auth` and Debian based systems @ `/etc/pam.d/common-password`.
|
||||||
|
|
||||||
|
The default password aging details can be found in the `/etc/login.defs` file.
|
||||||
|
|
||||||
|
I have trimmed this file for better understanding.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/login.defs
|
||||||
|
|
||||||
|
PASS_MAX_DAYS 99999
|
||||||
|
PASS_MIN_DAYS 0
|
||||||
|
PASS_MIN_LEN 5
|
||||||
|
PASS_WARN_AGE 7
|
||||||
|
```
|
||||||
|
|
||||||
|
**Details:**
|
||||||
|
|
||||||
|
* **`PASS_MAX_DAYS:`**` ` Maximum number of days a password may be used.
|
||||||
|
* **`PASS_MIN_DAYS:`**` ` Minimum number of days allowed between password changes.
|
||||||
|
* **`PASS_MIN_LEN:`**` ` Minimum acceptable password length.
|
||||||
|
* **`PASS_WARN_AGE:`**` ` Number of days warning given before a password expires.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
We will show you, how to implement the below eleven password policies in Linux.
|
||||||
|
|
||||||
|
* Password Max days
|
||||||
|
* Password Min days
|
||||||
|
* Password warning days
|
||||||
|
* Password history or Deny Re-Used Passwords
|
||||||
|
* Password minimum length
|
||||||
|
* Minimum upper case characters
|
||||||
|
* Minimum lower case characters
|
||||||
|
* Minimum digits in password
|
||||||
|
* Minimum other characters (Symbols)
|
||||||
|
* Account lock – retries
|
||||||
|
* Account unlock time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### What Is Password Max days?
|
||||||
|
|
||||||
|
This parameter limits the maximum number of days a password can be used. It’s mandatory for user to change his/her account password before expiry.
|
||||||
|
|
||||||
|
If they forget to change, they are not allowed to login into the system. They need to work with admin team to get rid of it.
|
||||||
|
|
||||||
|
It can be set in `/etc/login.defs` file. I’m going to set `90 days`.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/login.defs
|
||||||
|
|
||||||
|
PASS_MAX_DAYS 90
|
||||||
|
```
|
||||||
|
|
||||||
|
### What Is Password Min days?
|
||||||
|
|
||||||
|
This parameter limits the minimum number of days after password can be changed.
|
||||||
|
|
||||||
|
Say for example, if this parameter is set to 15 and user changed password today. Then he won’t be able to change the password again before 15 days from now.
|
||||||
|
|
||||||
|
It can be set in `/etc/login.defs` file. I’m going to set `15 days`.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/login.defs
|
||||||
|
|
||||||
|
PASS_MIN_DAYS 15
|
||||||
|
```
|
||||||
|
|
||||||
|
### What Is Password Warning Days?
|
||||||
|
|
||||||
|
This parameter controls the password warning days and it will warn the user when the password is going to expires.
|
||||||
|
|
||||||
|
A warning will be given to the user regularly until the warning days ends. This can helps user to change their password before expiry. Otherwise we need to work with admin team for unlock the password.
|
||||||
|
|
||||||
|
It can be set in `/etc/login.defs` file. I’m going to set `10 days`.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/login.defs
|
||||||
|
|
||||||
|
PASS_WARN_AGE 10
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** All the above parameters only applicable for new accounts and not for existing accounts.
|
||||||
|
|
||||||
|
### What Is Password History Or Deny Re-Used Passwords?
|
||||||
|
|
||||||
|
This parameter keep controls of the password history. Keep history of passwords used (the number of previous passwords which cannot be reused).
|
||||||
|
|
||||||
|
When the users try to set a new password, it will check the password history and warn the user when they set the same old password.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file. I’m going to set `5` for history of password.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok remember=5
|
||||||
|
```
|
||||||
|
|
||||||
|
### What Is Password Minimum Length?
|
||||||
|
|
||||||
|
This parameter keeps the minimum password length. When the users set a new password, it will check against this parameter and warn the user if they try to set the password length less than that.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file. I’m going to set `12` character for minimum password length.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
password requisite pam_cracklib.so try_first_pass retry=3 minlen=12
|
||||||
|
```
|
||||||
|
|
||||||
|
**try_first_pass retry=3** : Allow users to set a good password before the passwd command aborts.
|
||||||
|
|
||||||
|
### Set Minimum Upper Case Characters?
|
||||||
|
|
||||||
|
This parameter keeps, how many upper case characters should be added in the password. These are password strengthening parameters ,which increase the password strength.
|
||||||
|
|
||||||
|
When the users set a new password, it will check against this parameter and warn the user if they are not including any upper case characters in the password.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character for minimum password length.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 ucredit=-1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Set Minimum Lower Case Characters?
|
||||||
|
|
||||||
|
This parameter keeps, how many lower case characters should be added in the password. These are password strengthening parameters ,which increase the password strength.
|
||||||
|
|
||||||
|
When the users set a new password, it will check against this parameter and warn the user if they are not including any lower case characters in the password.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 lcredit=-1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Set Minimum Digits In Password?
|
||||||
|
|
||||||
|
This parameter keeps, how many digits should be added in the password. These are password strengthening parameters ,which increase the password strength.
|
||||||
|
|
||||||
|
When the users set a new password, it will check against this parameter and warn the user if they are not including any digits in the password.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 dcredit=-1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Set Minimum Other Characters (Symbols) In Password?
|
||||||
|
|
||||||
|
This parameter keeps, how many Symbols should be added in the password. These are password strengthening parameters ,which increase the password strength.
|
||||||
|
|
||||||
|
When the users set a new password, it will check against this parameter and warn the user if they are not including any Symbol in the password.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file. I’m going to set `1` character.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
password requisite pam_cracklib.so try_first_pass retry=3 minlen=12 ocredit=-1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Set Account Lock?
|
||||||
|
|
||||||
|
This parameter controls users failed attempts. It locks user account after reaches the given number of failed login attempts.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
auth required pam_tally2.so onerr=fail audit silent deny=5
|
||||||
|
account required pam_tally2.so
|
||||||
|
```
|
||||||
|
|
||||||
|
### Set Account Unlock Time?
|
||||||
|
|
||||||
|
This parameter keeps users unlock time. If the user account is locked after consecutive failed authentications.
|
||||||
|
|
||||||
|
It’s unlock the locked user account after reaches the given time. Sets the time (900 seconds = 15 minutes) for which the account should remain locked.
|
||||||
|
|
||||||
|
It can be set in `/etc/pam.d/system-auth` file.
|
||||||
|
|
||||||
|
```
|
||||||
|
# vi /etc/pam.d/system-auth
|
||||||
|
|
||||||
|
auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900
|
||||||
|
account required pam_tally2.so
|
||||||
|
```
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.2daygeek.com/how-to-set-password-complexity-policy-on-linux/
|
||||||
|
|
||||||
|
作者:[Magesh Maruthamuthu][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.2daygeek.com/author/magesh/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.2daygeek.com/5-ways-to-generate-a-random-strong-password-in-linux-terminal/
|
||||||
|
[2]: https://www.2daygeek.com/how-to-check-password-complexity-strength-and-score-in-linux/
|
200
translated/tech/20190505 How To Create SSH Alias In Linux.md
Normal file
200
translated/tech/20190505 How To Create SSH Alias In Linux.md
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (MjSeven)
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How To Create SSH Alias In Linux)
|
||||||
|
[#]: via: (https://www.ostechnix.com/how-to-create-ssh-alias-in-linux/)
|
||||||
|
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||||
|
|
||||||
|
如何在 Linux 中创建 SSH 别名
|
||||||
|
======
|
||||||
|
|
||||||
|
![How To Create SSH Alias In Linux][1]
|
||||||
|
|
||||||
|
如果你经常通过 SSH 访问许多不同的远程系统,这个技巧将为你节省一些时间。你可以通过 SSH 为频繁访问的系统创建 SSH 别名,这样你就不必记住所有不同的用户名、主机名、ssh 端口号和 IP 地址等。此外,它避免了在 SSH 到 Linux 服务器时重复输入相同的用户名、主机名、IP 地址、端口号。
|
||||||
|
|
||||||
|
### 在 Linux 中创建 SSH 别名
|
||||||
|
|
||||||
|
在我知道这个技巧之前,我通常使用以下任意一种方式通过 SSH 连接到远程系统。
|
||||||
|
|
||||||
|
使用 IP 地址:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ssh 192.168.225.22
|
||||||
|
```
|
||||||
|
|
||||||
|
或使用端口号、用户名和 IP 地址:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ssh -p 22 sk@192.168.225.22
|
||||||
|
```
|
||||||
|
|
||||||
|
或使用端口号、用户名和主机名:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ssh -p 22 sk@server.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
这里
|
||||||
|
|
||||||
|
* **22** 是端口号,
|
||||||
|
* **sk** 是远程系统的用户名,
|
||||||
|
* **192.168.225.22** 是我远程系统的 IP,
|
||||||
|
* **server.example.com** 是远程系统的主机名。
|
||||||
|
|
||||||
|
我相信大多数新手 Linux 用户和(或一些)管理员都会以这种方式通过 SSH 连接到远程系统。但是,如果你通过 SSH 连接到多个不同的系统,记住所有主机名或 IP 地址,还有用户名是困难的,除非你将它们写在纸上或者将其保存在文本文件中。别担心!这可以通过为 SSH 连接创建别名(或快捷方式)轻松解决。
|
||||||
|
|
||||||
|
我们可以用两种方法为 SSH 命令创建别名。
|
||||||
|
|
||||||
|
##### 方法 1 – 使用 SSH 配置文件
|
||||||
|
|
||||||
|
这是我创建别名的首选方法。
|
||||||
|
|
||||||
|
我们可以使用 SSH 默认配置文件来创建 SSH 别名。为此,编辑 **~/.ssh/config** 文件(如果此文件不存在,只需创建一个):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ vi ~/.ssh/config
|
||||||
|
```
|
||||||
|
|
||||||
|
添加所有远程主机的详细信息,如下所示:
|
||||||
|
|
||||||
|
```
|
||||||
|
Host webserver
|
||||||
|
HostName 192.168.225.22
|
||||||
|
User sk
|
||||||
|
|
||||||
|
Host dns
|
||||||
|
HostName server.example.com
|
||||||
|
User root
|
||||||
|
|
||||||
|
Host dhcp
|
||||||
|
HostName 192.168.225.25
|
||||||
|
User ostechnix
|
||||||
|
Port 2233
|
||||||
|
```
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
使用 SSH 配置文件在 Linux 中创建 SSH 别名
|
||||||
|
|
||||||
|
将 **Host**、**Hostname**、**User** 和 **Port** 的值替换为你自己的值。添加所有远程主机的详细信息后,保存并退出该文件。
|
||||||
|
|
||||||
|
现在你可以使用以下命令通过 SSH 进入系统:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ssh webserver
|
||||||
|
|
||||||
|
$ ssh dns
|
||||||
|
|
||||||
|
$ ssh dhcp
|
||||||
|
```
|
||||||
|
|
||||||
|
就是这么简单!
|
||||||
|
|
||||||
|
看看下面的截图。
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
使用 SSH 别名访问远程系统
|
||||||
|
|
||||||
|
看到了吗?我只使用别名(例如 **webserver**)来访问 IP 地址为 **192.168.225.22** 的远程系统。
|
||||||
|
|
||||||
|
请注意,这只使用于当前用户。如果要为所有用户(系统范围内)提供别名,请在 **/etc/ssh/ssh_config** 文件中添加以上行。
|
||||||
|
|
||||||
|
你还可以在 SSH 配置文件中添加许多其他内容。例如,如果你[**已配置基于 SSH 密钥的身份验证**][4],说明 SSH 密钥文件的位置,如下所示:
|
||||||
|
|
||||||
|
```
|
||||||
|
Host ubuntu
|
||||||
|
HostName 192.168.225.50
|
||||||
|
User senthil
|
||||||
|
IdentityFIle ~/.ssh/id_rsa_remotesystem
|
||||||
|
```
|
||||||
|
|
||||||
|
确保已使用你自己的值替换主机名、用户名和 SSH 密钥文件路径。
|
||||||
|
|
||||||
|
现在使用以下命令连接到远程服务器:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ssh ubuntu
|
||||||
|
```
|
||||||
|
|
||||||
|
这样,你可以添加希望通过 SSH 访问的任意多台远程主机,并使用别名快速访问它们。
|
||||||
|
|
||||||
|
##### 方法 2 – 使用 Bash 别名
|
||||||
|
|
||||||
|
这是创建 SSH 别名的一种应急变通的方法,可以加快通信的速度。你可以使用 [**alias 命令**][5]使这项任务更容易。
|
||||||
|
|
||||||
|
打开 **~/.bashrc** 或者 **~/.bash_profile** 文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
alias webserver='ssh sk@server.example.com'
|
||||||
|
alias dns='ssh sk@server.example.com'
|
||||||
|
alias dhcp='ssh sk@server.example.com -p 2233'
|
||||||
|
alias ubuntu='ssh sk@server.example.com -i ~/.ssh/id_rsa_remotesystem'
|
||||||
|
```
|
||||||
|
|
||||||
|
再次确保你已使用自己的值替换主机、主机名、端口号和 IP 地址。保存文件并退出。
|
||||||
|
|
||||||
|
然后,使用命令应用更改:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ source ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
或者
|
||||||
|
|
||||||
|
```
|
||||||
|
$ source ~/.bash_profile
|
||||||
|
```
|
||||||
|
|
||||||
|
在此方法中,你甚至不需要使用 “ssh 别名” 命令。相反,只需使用别名,如下所示。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ webserver
|
||||||
|
$ dns
|
||||||
|
$ dhcp
|
||||||
|
$ ubuntu
|
||||||
|
```
|
||||||
|
|
||||||
|
![][6]
|
||||||
|
|
||||||
|
这两种方法非常简单,但对于经常通过 SSH 连接到多个不同系统的人来说非常有用,而且非常方便。使用适合你的上述任何一种方法,通过 SSH 快速访问远程 Linux 系统。
|
||||||
|
* * *
|
||||||
|
|
||||||
|
**建议阅读:**
|
||||||
|
|
||||||
|
* [**允许或拒绝 SSH 访问 Linux 中的特定用户或组**][7]
|
||||||
|
* [**如何在 Linux 上 SSH 到特定目录**][8]
|
||||||
|
* [**如何在 Linux 中断开 SSH 会话**][9]
|
||||||
|
* [**4 种方式在退出 SSH 会话后保持命令运行**][10]
|
||||||
|
* [**SSLH – 共享相同端口的 HTTPS 和 SSH**][11]
|
||||||
|
|
||||||
|
* * *
|
||||||
|
|
||||||
|
目前这就是全部了,希望它对你有帮助。更多好东西要来了,敬请关注!
|
||||||
|
|
||||||
|
干杯!
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.ostechnix.com/how-to-create-ssh-alias-in-linux/
|
||||||
|
|
||||||
|
作者:[sk][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[MjSeven](https://github.com/MjSeven)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.ostechnix.com/author/sk/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.ostechnix.com/wp-content/uploads/2019/04/ssh-alias-720x340.png
|
||||||
|
[2]: http://www.ostechnix.com/wp-content/uploads/2019/04/Create-SSH-Alias-In-Linux.png
|
||||||
|
[3]: http://www.ostechnix.com/wp-content/uploads/2019/04/create-ssh-alias.png
|
||||||
|
[4]: https://www.ostechnix.com/configure-ssh-key-based-authentication-linux/
|
||||||
|
[5]: https://www.ostechnix.com/the-alias-and-unalias-commands-explained-with-examples/
|
||||||
|
[6]: http://www.ostechnix.com/wp-content/uploads/2019/04/create-ssh-alias-1.png
|
||||||
|
[7]: https://www.ostechnix.com/allow-deny-ssh-access-particular-user-group-linux/
|
||||||
|
[8]: https://www.ostechnix.com/how-to-ssh-into-a-particular-directory-on-linux/
|
||||||
|
[9]: https://www.ostechnix.com/how-to-stop-ssh-session-from-disconnecting-in-linux/
|
||||||
|
[10]: https://www.ostechnix.com/4-ways-keep-command-running-log-ssh-session/
|
||||||
|
[11]: https://www.ostechnix.com/sslh-share-port-https-ssh/
|
Loading…
Reference in New Issue
Block a user