{"id":71215,"date":"2020-04-21T00:42:52","date_gmt":"2020-04-21T07:42:52","guid":{"rendered":"https:\/\/kinsta.com\/?post_type=knowledgebase&p=71215"},"modified":"2022-10-07T22:26:34","modified_gmt":"2022-10-07T20:26:34","slug":"unzip-zip-file","status":"publish","type":"knowledgebase","link":"https:\/\/kinsta.com\/knowledgebase\/unzip-zip-file\/","title":{"rendered":"How to Unzip a ZIP File in Terminal Using SSH (Works on Linux Servers)"},"content":{"rendered":"
Restoring a backup from a ZIP file \u2013\u00a0like the ones generated by our downloadable backup<\/a> feature \u2013 can sometimes be a lengthy process. If you unzip a ZIP file locally on your computer before uploading the backup with SFTP,<\/a> you\u2019ll likely run into a bottleneck because SFTP can only transfer a limited number of files concurrently.<\/p>\n Fortunately, there is a faster method that can reduce the backup restore time significantly.<\/p>\n Instead of unzipping a ZIP file locally and uploading the unzipped folder, it\u2019s often faster to upload a ZIP file to the server before unzipping it.<\/p>\n In this post, we\u2019ll explain how to unzip a file uploaded to a server using SSH. For our example, we will unzip a backup file on a Kinsta server, but the same technique can be used to unzip any ZIP file on any Linux server.<\/p>\n The first step is to log in to your server with SSH<\/a>. To do this, you\u2019ll need an SSH client like the built-in Terminal app<\/a> in macOS and Linux or the free PuTTY client<\/a> on Windows, and the SSH login details \u2013\u00a0IP address, username, password (optional), and port.<\/p>\n You may be wondering why the password is optional. When logging in to your server with SSH, there are two authentication methods \u2013\u00a0password and public key authentication. The password authentication method uses a plain text password.<\/p>\n Public key authentication is widely regarded as a more secure alternative to password authentication. The public key authentication method requires you to generate a key pair<\/a> \u2013\u00a0public key and private key. The public key is uploaded to the server, while the private key is stored locally on your computer. During the SSH login process, the cryptographic link between the two keys is verified to authenticate the user.<\/p>\n Kinsta users can upload SSH public keys<\/a> in the MyKinsta dashboard. If you are using another server provider, we recommend taking a look at the relevant documentation on how to upload SSH keys<\/a> to the server.<\/p>\n Now that we\u2019ve covered the differences between password and public key authentication, let\u2019s move on to the SSH login process. For Kinsta users, SSH login details along with the full SSH terminal command are provided in the MyKinsta dashboard.<\/p>\nStep 1 – Log In to Your Server with SSH<\/h2>\n
Password vs Public Key Authentication<\/h3>\n