How to SSH into Ubuntu from a terminal with public key authentication

Server rental (ConoHa)

・ OS Select Ubuntu ConoHa.png

・ SSH Key Select to create a new key Download Key with "+ Add" 図1.png

Rent a server with this setting

Operation in the terminal

Start a terminal and change to the directory containing the public key you downloaded earlier.

cd Downloads/

Next, type the following command to give the read permission of the downloaded public key only to the PC owner. xxxxx.pem is the name of the downloaded file.

chmod 400 xxxxx.pem

Finally, type the following command to log in with your public key If successful, welcome to ~~~~~ This time log in with the root account For the IP address, enter the IP address of the rental server rented at ConoHa.

ssh -i xxxxx.pem root@<IP address>

Recommended Posts

How to SSH into Ubuntu from a terminal with public key authentication
Settings for SSH connection from Windows to Ubuntu using public key authentication
How to open a script file from Ubuntu with VS code
Create a private key / public key in CentOS8.2 and connect to SSH with VS Code
How to divide a two-dimensional array into four with ruby
How to use a foreign key with FactoryBot ~ Another solution
How to Burning a Install Disk of Windows from Ubuntu
How to set up a proxy with authentication in Feign
How to rename a model with foreign key constraints in Rails
How to encrypt and decrypt with RSA public key in Java
How to set up SSH from scratch without connecting a monitor or keyboard [Raspberry Pi, Ubuntu]
How to delete data with foreign key
I was a little addicted to ssh connection from mac to linux (ubuntu)
How to get a heapdump from a Docker container
How to generate a primary key using @GeneratedValue
Rip a CD to MP3 with Ubuntu 18.04 LTS
How to write test code with Basic authentication
How to use nfs protocol version 2 with ubuntu 18.04
How to build a Pytorch environment on Ubuntu
How to make a factory with a model with polymorphic association
How to use an array for a TreeMap key
How to deploy to Heroku from a local docker image
How to delete a new_record object built with Rails
How to manually generate a JWT with Rails Knock
How to install NVIDIA driver on Ubuntu ssh destination
How to output standard from an array with forEach
[How to insert a video in haml with Rails]
[Java] How to erase a specific character from a character string
How to use RealSense with ubuntu 20.04 and ROS Noetic
How to get started with creating a Rails app
I want to redirect sound from Ubuntu with xrdp
Ssh connect from container to git with VSCode Remote Container
[Java] How to start a new line with StringBuilder
How to get jdk etc from oracle with cli
A new employee tried to create an authentication / authorization function from scratch with Spring Security
How to read a library from a JAR file with VS Code << How to not use Maven / Gradle >>
How to take a screenshot with the Android Studio emulator
How to request a CSV file as JSON with jMeter
Let's write how to make API with SpringBoot + Docker from 0
[Ruby] How to split each GraphQL query into a file
Java program to resize a photo into a square with margins
How to write a migration from Rails datetime type to date type
[iOS] [Objective-C] How to update a widget from an Objective-C app
How to create a form to select a date from the calendar
[Java] How to convert a character string from String type to byte type
Learning Ruby with AtCoder 13 How to make a two-dimensional array
How to store a string from ArrayList to String in Java (Personal)
How to move another class with a button action of another class.
Mapping to a class with a value object in How to MyBatis
How to register as a customer with Square using Tomcat
How to use the certificate and private key created by Docker's BASIC authentication with AWS ALB
What to do if an SSH key authentication error occurs during automatic deployment to EC2 with Capistrano
How to introduce Basic authentication
How to leave a comment
How to number (number) with html.erb
How to update with activerecord-import
How to migrate from JUnit4 to JUnit5
How to insert a video
How to add HDD to Ubuntu
How to create a method
How to cancel cell merging within a specified range with POI