How to create a new SSH key pair on macOS and Linux
Автор: Servers.com
Загружено: 2025-05-19
Просмотров: 1007
Описание:
Welcome to the ‘How it works’ series from servers.com, a series where we’ll be guiding you through infrastructure processes and set-ups with tutorials. In this video, we’ll show you how to create a new SSH key pair on macOS and Linux.
The first and easiest way to create an SSH key pair is to use default parameters. To do so, open the Terminal app on your local machine and run the following command:
ssh-keygen
The utility will ask you to enter the name of file you want to create and a path to a directory where you want to store it. This is an optional step, you can skip it by pressing enter and your keys will be stored In the default directory.
Then the utility will ask you to enter the passphrase. This is also an optional step and you can skip it by pressing enter two times.
Now you can see that your SSH key pair has been created and stored in the default directory. To enter this directory, run the following command:
cd ~/.ssh/
Now type 'ls', press enter, and you will see a list of files in this directory including you SSH key pair.
To view your public key, run the following command:
cat id_rsa.pub
You will see an output of your public key which you can copy and use to configure an authentication on your server.
Do not share your private key with others or move it to external devices.
The second way to create an SSH key pair is to use your own parameters.
Open your Terminal app and type 'ssh-keygen'. If you run this command, it will generate the rsa key type by default. If you want to create a different key type such as 'ed25519', 'ecdsa' or 'dsa', add '-t' to your command and specify this type.
Then the utility will ask you to name a file you want to create and specify a path to a directory where you want to store it. For example, you can store your keys in the Documents folder and name it 'ssh-key'.
Then the utility will ask you to enter the passphrase to protect your keys. Enter it and retype to confirm.
Now you can see that your SSH key pair has been created and stored in the directory you specified. To enter this directory, run the following command: cd documents/
Now type 'ls', press enter, and you will see a list of files in this directory including you public and private SSH keys.
To view your public key, run the following command:
cat ssh-key.pub
You will see an output of your public key which you can copy and use to configure an authentication on your server.
Your SSH key pair is now ready for use.
If you have any questions or queries, you can visit the support page on our website at https://www.servers.com/company/support.
00:00 Intro
00:13 Creating SSH keys with default parameters
01:31 Creating SSH keys with custom parameters
02:55 For any questions and queries
03:03 Outro
For more information about creating SSH keys, refer to this article:
https://www.servers.com/support/knowl...
ABOUT SERVERS.COM
Trust sits at the heart of hosting. Which is why we design bespoke hosting solutions for every customer. Tailored to you, in consultation with our experts, our solutions marry the best of traditional hosting and cloud scalability to deliver powerful bare metal performance that you can rely on.
The quality extends to the exceptional service provided by our team of specialists, who work in trusted partnership with you to support you every step of the way.
Available from prime locations worldwide, we are defining the next era of hosting with an uncompromising dedication to excellence that you can trust in.
Find out more about our range of products:
Dedicated servers: https://www.servers.com/products/dedi...
Cloud servers: https://www.servers.com/products/clou...
Cloud storage: https://www.servers.com/products/clou...
Load balancing: https://www.servers.com/products/load...
Firewall: https://www.servers.com/products/fire...
Private racks: https://www.servers.com/products/priv...
Private cloud: https://www.servers.com/products/priv...
Kubernetes clusters: https://www.servers.com/products/kube...
FIND US AT
https://www.servers.com/
FOLLOW US ON SOCIAL
LinkedIn: / servers-com
X: https://x.com/servers_com
#Linux #Cloud #Server #Hosting #Password #Access #CloudServer #SecureAccess #DataSecurity #ITInfrastructure #Networking #CyberSecurity #ServerSetup #CloudComputing #Virtualization #SystemAdmin #LinuxCommands #SSHAccess #TechSupport #DataCenter #CloudDeployment #LinuxHosting #InfrastructureSetup #ManagedHosting #CloudIntegration #WebHosting #RootAccess #ServerManagement #NetworkingTips #OpenSource #TechTutorial #PerformanceOptimization #DevOpsTools #DataStorage #AutomationTools #ITSupport #SecureLogin #AdminPanel #LinuxTips #ServerConfiguration #CloudTechnology
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: