फ्री Ubuntu VPS बनाएँ और SSH कनेक्शन जाँचें
यह प्रक्रिया Oracle Always Free में पात्र Ubuntu instance बनाकर अपने computer से SSH कनेक्शन जाँचती है। Approved account, उपलब्ध capacity और चुने गए संसाधनों के लिए बचा हुआ quota पहले से चाहिए। यह नया, छोटा experiment है; production capacity का दावा नहीं।
VPSuntu · अपडेट · लगभग 6 मिनट में पढ़ें
इस गाइड में
Account और एक छोटा instance चुनें
उदाहरण में home region का VM.Standard.E2.1.Micro, AMD x86, 1 GB RAM और पात्र Ubuntu 24.04 LTS image है। Console में exact image तथा shape की eligibility देखें। मुफ्त Ubuntu VPS के लिए केवल Ubuntu नाम होना पर्याप्त नहीं।
Instance, network और console connections बनाने की permission चाहिए। अपने Linux/macOS/WSL computer पर OpenSSH रखें। Signup या free capacity तय नहीं है और idle instance वापस लिया जा सकता है। पहले फ्री VPS quota और trial की तुलना पढ़ें।
Launch से पहले अपनी SSH key बनाएँ
ये commands अपने computer पर चलाएँ। वही filename पहले से मौजूद हो तो पूरे उदाहरण में नया नाम लें; existing private key को overwrite न करें। Prompt पर passphrase चुनें।
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa -b 3072 -f ~/.ssh/oci-ubuntu-free
chmod 600 ~/.ssh/oci-ubuntu-free
cat ~/.ssh/oci-ubuntu-free.pubPrivate file अपने पास सुरक्षित रखें और केवल .pub file upload करें। आपकी public key login की अनुमति बताती है; server की host key उस machine की पहचान है। दोनों अलग हैं।
Compartment, region, instance name और OCID के लिए inventory बनाएँ। ubuntu-free-ssh इस experiment का sample नाम है; नाम अकेला resource की अनूठी पहचान नहीं हो सकता।
Public subnet और सीमित SSH access बनाएँ
इस experiment के लिए dedicated VCN, जैसे 10.20.0.0/16, तथा regional public subnet, जैसे 10.20.1.0/24 बनाएँ। Existing network से जुड़ना हो तो non-overlapping ranges चुनें। VCN में internet gateway बनाएँ और enable करें।
Subnet की associated route table में 0.0.0.0/0 का target वही gateway रखें। Instance को public IPv4 भी चाहिए; route अपने आप address नहीं देता।
Security list में stateful ingress रखें: source आपके workstation का अभी का public IPv4/32, protocol TCP, source ports All, destination 22। Wi-Fi का private address इस्तेमाल न करें। आवश्यक default egress और ICMP rules बनाए रखें।
इस dedicated list का world-open SSH rule बदलें। केवल नया narrow rule जोड़ना दूसरे permissive rule को रद्द नहीं करता। सभी attached security lists तथा NSGs देखें। इस उदाहरण में नया NSG, NAT या load balancer नहीं है। Public IP बदले तो /32 rule अपडेट करें।
पात्र Ubuntu VM बनाएँ
Home region में Compute → Instances → Create instance खोलें। Intended compartment और ubuntu-free-ssh नाम के साथ नीचे की settings की जाँच करें।
छोटी स्क्रीन पर सभी कॉलम देखने के लिए तालिका को बगल में स्क्रॉल करें।
| Setting | इस उदाहरण का चयन |
|---|---|
| Image | पात्र Canonical Ubuntu 24.04 LTS x86/amd64 platform image |
| Shape | VM.Standard.E2.1.Micro, AMD, 1 GB RAM |
| Boot volume | 50 GB; पात्र performance और बचा quota जाँचें |
| Network | Dedicated public subnet और assigned public IPv4 |
| SSH key | oci-ubuntu-free.pub की public key |
| Extras | अतिरिक्त volumes, paid image software या optional managed service नहीं |
Oracle के combined boot/block allowance में अन्य volumes भी गिनें। Estimate में credit से छिपे charge को स्थायी मुफ्त कवरेज न मानें। अस्पष्ट मद के लिए पूरे खर्च की सूची देखें।
नीचे का text local file में बचाकर Advanced options → Management → Initialization script में दें। यह cloud-init से guest की public host keys और fingerprints console पर दिखाता है; इसमें private key नहीं है।
#cloud-config
ssh:
emit_keys_to_console: trueSettings पढ़कर ही create करें। Free shape उपलब्ध न हो तो अनजाने में paid विकल्प न चुनें। Running होने पर instance OCID, boot-volume OCID और public IPv4 दर्ज करें।
Guest की host identity भरोसेमंद Console से जाँचें
पहली SSH prompt स्वीकार करने से पहले authenticated OCI Console में सही instance खोलें। Console connection के अंतर्गत Launch Cloud Shell connection चुनें; इसके लिए permissions चाहिए और यह console history capture के लिए connection तैयार करता है।
Console history में View current history खोलें और first-boot output रखें। cloud-init के SSH HOST KEY FINGERPRINTS में guest host key का type और SHA256 fingerprint देखें। Authorized user key के fingerprint से इसे न मिलाएँ।
Console connection resource पर दिखा endpoint fingerprint सामान्य guest SSH की पहचान नहीं है। Guest का record न मिले तो OCI की documented console recovery प्रक्रिया अपनाएँ। बिना भरोसे के ssh-keyscan output को प्रमाण न बनाएँ।
Computer से कनेक्ट करें और image जाँचें
अपने workstation पर 203.0.113.20 की जगह असली public IPv4 लगाएँ। यह documentation address है। SSH prompt का key type और fingerprint trusted boot record से मिलें तभी स्वीकार करें।
ssh -o StrictHostKeyChecking=ask -i ~/.ssh/oci-ubuntu-free ubuntu@203.0.113.20Ubuntu platform image का user ubuntu है, opc नहीं। Login के बाद निम्न read-only checks VPS पर चलाएँ।
cloud-init status --wait
cat /etc/os-release
dpkg --print-architecture
free -h
df -h /
sudo ss -lntp
sudo iptables -SProvisioning पूर्ण, Ubuntu 24.04, amd64, अपेक्षित memory/disk और listening SSH जाँचें। Workstation से login केवल public SSH path की जाँच है; इससे website प्रकाशित या app capacity प्रमाणित नहीं होती।
Image का firewall बदले बिना अपडेट करें
cloud-init सफल होने के बाद package information refresh करें और पुष्टि से पहले upgrade सूची पढ़ें।
sudo apt update
sudo apt upgradeपहला session खुला रखें और दूसरे terminal से नया login जाँचें। Reboot आवश्यक हो तो disposable server पर जानबूझकर reboot करें, फिर login और basic checks दोहराएँ।
इस OCI Ubuntu image पर UFW install या enable न करें। Oracle/Canonical की image firewall तथा iSCSI rules बनाए रखें। बाद की website को OCI network permissions और compatible guest rules दोनों चाहिए। Rules flush करना troubleshooting नहीं है।
छोटी स्क्रीन पर सभी कॉलम देखने के लिए तालिका को बगल में स्क्रॉल करें।
| समस्या | पहली जाँच |
|---|---|
| SSH timeout | Public IPv4, gateway route, source /32 और सभी rules |
| Permission denied (publickey) | ubuntu user और सही private/public key pair |
| Host-key mismatch | Instance identity और trusted boot output |
| Provisioning/package error | Console history, cloud-init और repository access |
अगला कदम SSH diagnosis या वेबसाइट deployment है। दोनों में provider-specific firewall की शर्तें बनाए रखें।
Recovery copy रखें या अपना experiment बंद करें
महत्वपूर्ण डेटा और rebuild notes VPS से बाहर रखें। फाइल backup restore का अभ्यास करें। Administrative access मिलने से machine अपने आप production-ready नहीं होती।
समापन पर आवश्यक export जाँचें और सही compartment में OCID से वही instance चुनकर Terminate करें। Boot volume default रूप से retain हो सकता है; permanent deletion तभी चुनें जब उसी volume की आवश्यकता न हो और export सत्यापित हो।
Inventory के retained volumes, backups, addresses और console connections देखें। Dedicated subnet/gateway हटाने से पहले जाँचें कि कोई और उनका उपयोग नहीं करता। Account-wide deletion न करें; बाद की usage reports भी देखें।
सवाल-जवाब
क्या यह public VPS है या local VM?
यह provider की VM है जिसमें public address है। SSH जानबूझकर आपके workstation के public IP तक सीमित है। इसे चलाने के लिए आपका अपना computer हमेशा चालू रहना आवश्यक नहीं।
अगर मुफ्त shape उपलब्ध न हो तो?
रुकें या दूसरे documented programme का मूल्यांकन करें। दूसरी shape, region या अधिक RAM की मुफ्त पात्रता अपने आप न मानें।
मूल तकनीकी दस्तावेज़
- Oracle Always Free resources
- Oracle platform images and essential firewall rules
- Creating an Oracle Compute instance
- Oracle SSH key pairs
- Oracle public subnet scenario
- Oracle internet gateway routing
- Oracle security rules
- Oracle console connections and Cloud Shell
- Capturing Oracle instance console history
- Cloud-init Keys to Console module
- Connecting to an OCI Linux instance
- Ubuntu 24.04 release notes: Oracle firewall compatibility
- Terminating an Oracle instance