bootstrap.ihemon.me

Give Emon access to this computerEmon-কে এই computer-এ access দিন

Emon asked you to open this page. Copy one command, paste it on the computer he needs to work on, and send him what it prints. It lets Emon log in with his own key over SSH. It does not share or change any password, and you can take the access away any time from this same page.

Emon এই page খুলতে বলেছে। নিচের একটা command copy করে যে computer-এ Emon কাজ করবে সেখানে paste করুন, তারপর যা দেখায় সেটা Emon-কে পাঠিয়ে দিন। এতে Emon নিজের key দিয়ে SSH-এ login করতে পারবে। কোনো password লাগে না, কিছু বদলায়ও না। কাজ শেষ হলে এই page থেকেই access বন্ধ করে দিতে পারবেন।

Linux

Debian, Ubuntu, Proxmox, Rocky, Alma, RHEL, Fedora, Arch, Alpine and most others.

Debian, Ubuntu, Proxmox, Rocky, Alma, RHEL, Fedora, Arch, Alpine সহ প্রায় সব Linux.

Give Emon accessEmon-কে access দিন

  1. Open a Terminal (Ubuntu: press Ctrl+Alt+T), or log in to the server.
  2. Copy the line below, paste it, press Enter. Type your password if it asks (nothing shows while you type, that is normal).
  3. At the end it prints a block between two lines of =====. Send that whole block to Emon.
  1. Terminal খুলুন (Ubuntu-তে Ctrl+Alt+T চাপুন), অথবা server-এ login করুন।
  2. নিচের line টা copy করে paste করুন, তারপর Enter চাপুন। Password চাইলে দিন (type করার সময় কিছু দেখাবে না, এটাই স্বাভাবিক)।
  3. শেষে দুইটা ===== line-এর মাঝে একটা লেখা আসবে। পুরোটা copy করে Emon-কে পাঠান।
curl -fsSL https://bootstrap.ihemon.me/grant.sh | sudo sh

No curl? Use wget -qO- https://bootstrap.ihemon.me/grant.sh | sudo sh. Logged in as root (Proxmox)? Leave out sudo. To give access to root instead of you, end it with | sudo sh -s -- --root.

curl নেই? তাহলে wget -qO- https://bootstrap.ihemon.me/grant.sh | sudo sh দিন। root হয়ে login করা থাকলে (Proxmox) sudo বাদ দিন। নিজের বদলে root-এ access দিতে শেষে | sudo sh -s -- --root দিন।

Do it by hand instead (step by step)নিজে হাতে করতে চাইলে (ধাপে ধাপে)

1. Install and start the SSH server:

১. SSH server install করে চালু করুন:

sudo apt-get update && sudo apt-get install -y openssh-server curl
sudo systemctl enable --now ssh

2. Add Emon's key (from github.com/emon5122.keys, only the Emon-Key line):

২. Emon-এর key যোগ করুন (github.com/emon5122.keys থেকে, শুধু Emon-Key line টা):

mkdir -p ~/.ssh && chmod 700 ~/.ssh
grep -qF AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk ~/.ssh/authorized_keys 2>/dev/null || { echo; curl -fsSL https://github.com/emon5122.keys | grep -F AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk; } >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

3. Send Emon your user name and IP address:

৩. আপনার user name আর IP address Emon-কে পাঠান:

whoami; hostname; ip -4 -brief addr

Remove Emon's accessEmon-এর access বন্ধ করুন

When the work is done. It removes only Emon's key (from every user on this computer) and shows what it removed. Your other keys and settings stay as they are.

কাজ শেষ হলে। এটা শুধু Emon-এর key সরায় (এই computer-এর সব user থেকে) আর কী সরালো সেটা দেখায়। বাকি key বা setting কিছুই বদলায় না।

curl -fsSL https://bootstrap.ihemon.me/revoke.sh | sudo sh

Also turn the SSH server off (only if nobody else uses SSH on this computer):

SSH server-ও বন্ধ করতে চাইলে (শুধু যদি এই computer-এ আর কেউ SSH ব্যবহার না করে):

curl -fsSL https://bootstrap.ihemon.me/revoke.sh | sudo sh -s -- --stop-ssh
Do it by hand insteadনিজে হাতে করতে চাইলে
sed -i '\#AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk#d' ~/.ssh/authorized_keys

Turn SSH off: sudo systemctl disable --now ssh (Debian/Ubuntu) or sudo systemctl disable --now sshd (others).

SSH বন্ধ করতে: sudo systemctl disable --now ssh (Debian/Ubuntu), অন্যগুলোতে sudo systemctl disable --now sshd।

macOS

Give Emon accessEmon-কে access দিন

  1. Open Terminal: press ⌘+Space, type Terminal, press Enter.
  2. Copy the line below, paste it, press Enter. Type your Mac password when it asks (nothing shows while you type).
  3. Send Emon the block it prints at the end (between the ===== lines).
  1. Terminal খুলুন: ⌘+Space চেপে Terminal লিখে Enter চাপুন।
  2. নিচের line টা copy করে paste করুন, Enter চাপুন। Mac-এর password চাইলে দিন (type করার সময় কিছু দেখাবে না)।
  3. শেষে ===== line-এর মাঝে যা আসবে, পুরোটা Emon-কে পাঠান।
curl -fsSL https://bootstrap.ihemon.me/grant.sh | sudo sh

If it says it could not turn on Remote Login: open System Settings → General → Sharing, switch on Remote Login, then run the line again.

যদি বলে Remote Login চালু করা যায়নি: System Settings → General → Sharing-এ গিয়ে Remote Login on করুন, তারপর line টা আবার চালান।

Do it by hand instead (step by step)নিজে হাতে করতে চাইলে (ধাপে ধাপে)

1. Turn on System Settings → General → Sharing → Remote Login (or run the line below).

১. System Settings → General → Sharing → Remote Login on করুন (অথবা নিচের line টা চালান)।

sudo systemsetup -setremotelogin on

2. Add Emon's key:

২. Emon-এর key যোগ করুন:

mkdir -p ~/.ssh && chmod 700 ~/.ssh
grep -qF AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk ~/.ssh/authorized_keys 2>/dev/null || { echo; curl -fsSL https://github.com/emon5122.keys | grep -F AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk; } >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

3. Send Emon your user name and IP:

৩. আপনার user name আর IP Emon-কে পাঠান:

whoami; hostname; ipconfig getifaddr en0

Remove Emon's accessEmon-এর access বন্ধ করুন

Removes only Emon's key, from every user on this Mac, and shows what it removed.

শুধু Emon-এর key সরায়, এই Mac-এর সব user থেকে, আর কী সরালো সেটা দেখায়।

curl -fsSL https://bootstrap.ihemon.me/revoke.sh | sudo sh

Also turn Remote Login off (only if nobody else uses it):

Remote Login-ও বন্ধ করতে চাইলে (শুধু যদি আর কেউ ব্যবহার না করে):

curl -fsSL https://bootstrap.ihemon.me/revoke.sh | sudo sh -s -- --stop-ssh
Do it by hand insteadনিজে হাতে করতে চাইলে
sed -i '' '\#AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk#d' ~/.ssh/authorized_keys

Turn off System Settings → General → Sharing → Remote Login if you want SSH off too.

SSH-ও বন্ধ চাইলে System Settings → General → Sharing → Remote Login off করে দিন।

Windows

Windows 10, Windows 11, Windows Server 2016 and newer.

Windows 10, Windows 11, Windows Server 2016 আর নতুনগুলো।

Give Emon accessEmon-কে access দিন

  1. Click Start, type PowerShell, right-click Windows PowerShell and choose Run as administrator. Click Yes.
  2. Copy the line below, paste it in the blue/black window (right-click pastes), press Enter. Installing the SSH server can take a few minutes the first time.
  3. Send Emon the block it prints at the end (between the ===== lines).
  1. Start-এ click করে PowerShell লিখুন, Windows PowerShell-এ right-click করে Run as administrator দিন। Yes চাপুন।
  2. নিচের line টা copy করে নীল/কালো window-এ paste করুন (right-click করলেই paste হয়), Enter চাপুন। প্রথমবার SSH server install হতে কয়েক মিনিট লাগতে পারে।
  3. শেষে ===== line-এর মাঝে যা আসবে, পুরোটা Emon-কে পাঠান।
irm https://bootstrap.ihemon.me/grant.ps1 | iex

Windows Server 2016, or if you see "Could not create SSL/TLS secure channel": use this line instead.

Windows Server 2016 হলে, অথবা "Could not create SSL/TLS secure channel" দেখালে, এই line টা দিন:

[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; irm https://bootstrap.ihemon.me/grant.ps1 | iex
Do it by hand instead (step by step)নিজে হাতে করতে চাইলে (ধাপে ধাপে)

1. Install and start the SSH server (PowerShell as administrator):

১. SSH server install করে চালু করুন (PowerShell, administrator হিসেবে):

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Set-Service sshd -StartupType Automatic; Start-Service sshd
if (-not (Get-NetFirewallRule -Name OpenSSH-Server-In-TCP -ErrorAction SilentlyContinue)) { New-NetFirewallRule -Name OpenSSH-Server-In-TCP -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 }

2. Add Emon's key. For an administrator account it goes in one shared file that only Administrators and SYSTEM may read:

২. Emon-এর key যোগ করুন। Administrator account-এর জন্য key যায় একটা আলাদা file-এ, যেটা শুধু Administrators আর SYSTEM পড়তে পারে:

$f = "$env:ProgramData\ssh\administrators_authorized_keys"
(Invoke-RestMethod https://github.com/emon5122.keys) -split "`n" | Where-Object { $_ -like '*AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk*' } | Add-Content -Encoding ascii $f
icacls $f /inheritance:r /grant '*S-1-5-32-544:F' /grant '*S-1-5-18:F'

3. Send Emon your user name and IP:

৩. আপনার user name আর IP Emon-কে পাঠান:

whoami; hostname; ipconfig | findstr IPv4

Remove Emon's accessEmon-এর access বন্ধ করুন

In PowerShell as administrator. Removes only Emon's key (from the administrators file and every user) and shows what it removed.

PowerShell administrator হিসেবে খুলে চালান। শুধু Emon-এর key সরায় (administrators file আর সব user থেকে), আর কী সরালো সেটা দেখায়।

irm https://bootstrap.ihemon.me/revoke.ps1 | iex

Also turn the SSH server off (only if nobody else uses SSH on this computer):

SSH server-ও বন্ধ করতে চাইলে (শুধু যদি এই computer-এ আর কেউ SSH ব্যবহার না করে):

& ([scriptblock]::Create((irm https://bootstrap.ihemon.me/revoke.ps1))) -StopSsh
Do it by hand insteadনিজে হাতে করতে চাইলে
$f = "$env:ProgramData\ssh\administrators_authorized_keys"
(Get-Content $f) | Where-Object { $_ -notlike '*AAAAC3NzaC1lZDI1NTE5AAAAIJQNrt4zH0k6C2G4Y7fZX+4S73gLZvrHodPTl2hELfWk*' } | Set-Content -Encoding ascii $f

Turn SSH off: Stop-Service sshd; Set-Service sshd -StartupType Disabled

SSH বন্ধ করতে: Stop-Service sshd; Set-Service sshd -StartupType Disabled

Good to knowজেনে রাখুন