DEV Community

Fega Suseno
Fega Suseno

Posted on • Edited on

2

Remot SSH Using Simple Metode

Hallo World!
Pada postingan ini kita kan belajar meremot ssh dari server local dengan metode yg sederhana. Kita akan beri nama pada host yg akan kita remot sehingga nnti bisa di remot hanya dengan alias. Langsung ke caranya:

Setup Host alias pada .ssh/config

nano .ssh/config
Enter fullscreen mode Exit fullscreen mode

Lalu buat seperti konfig di bawah

Host devops
  HostName 10.10.10.1
  User root
  IdentityFile /home/nzucode/key-devops.pem
  Port 7722
Enter fullscreen mode Exit fullscreen mode

Perhatikan pada bagian devops, nah itu merupakan alias name dan bisa di ganti sesuai keinginan. Saya beri nama devops karena ini server tim devops sehingga mudah untuk menamakannya.
IdentityFile /home/nzucode/key-devops.pem ini adalah lokasi private key, jika baris ini dihilangkan maka nanti tetap perlu memasukan password.

Lalu untuk memanggilnya kita bisa secara langsung dengan mengetikan perintah ini

ssh devops
Enter fullscreen mode Exit fullscreen mode

Supaya bisa langsung login, kita bisa kombinasikan dengan metode private dan public key.

Selamat mencoba semoga bermanfaat.

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay