Skip to main content

SSH from linux

 

  1. Connecting to a Linux Instance

    You connect to a Linux instance using SSH.

    To connect to a Linux instance from a Unix-style system
    1. Use the following command to set the file permissions so that only you can read the file:

  2. chmod 400 <private_key_file>

    <private_key_file> is the full path and name of the file that contains the private key associated with the instance you want to access.

  3. Use the following SSH command to access the instance.

  4. Note

    Copy the following example to ensure the correct characters are used. If the wrong character is used in ssh -i, a Could not resolve hostname ...: No such host is known. error might occur.
    ssh -i <private_key_file> <username>@<public-ip-address>

    <private_key_file> is the full path and name of the file that contains the private key associated with the instance you want to access.

    <username> is the default username for the instance. For Oracle Linux and CentOS images, the default username is opc. For Ubuntu images, the default username is ubuntu.

    <public-ip-address> is your instance IP address that you retrieved from the Console.

Popular posts from this blog

LinuxONE Community Cloud

LinuxONE Community Cloud 注册网址 https://linuxone.cloud.marist.edu/#/login 优点: 不限流量 无需登记信用卡等支付信息 仅需一个Email地址即可注册 VPS硬件配置为 VCPUS:2 / RAM:4096MB / Root Disk:50GB 系统映像为 ubuntu22.04

github.com/Nyr/wireguard-install

继上一期介绍纯命令行安装OPENVPN服务器之后,又发现了同一家Nyr的纯命令行安装wg开源代码。 来源如下:https://github.com/Nyr/wireguard-install 也是2行代码,直接生成二维码可以供手机扫描使用。这样省去了下载配置文件的麻烦,非常省心。 首先下载安装脚本 wget https://git.io/wireguard -O wireguard-install.sh 更改文件为可执行属性 chmod +x wireguard-install.sh 然后执行 sudo ./wireguard-install.sh 回答一些参数设置的问题,就可以安装起来了...

wireguard easy server setup

  If you haven't installed Docker yet, install it by running: $ curl -sSL https://get.docker.com | sh $ sudo usermod -aG docker $( whoami ) $ exit Run WireGuard Easy  ––––––––––––– docker run -d \   --name=WG-SCX \   -e WG_HOST=🚨你的伺服器IP \   -e PASSWORD=🚨你的管理界面密碼 \   -e WG_DEFAULT_DNS=8.8.8.8,8.8.4.4 \   -v ~/.wg-easy:/etc/wireguard \   -p 51820:51820/udp \   -p 51821:51821/tcp \   --cap-add=NET_ADMIN \   --cap-add=SYS_MODULE \   --sysctl="net.ipv4.conf.all.src_valid_mark=1" \   --sysctl="net.ipv4.ip_forward=1" \   --restart unless-stopped \   weejewel/wg-easy ––––––––––––––––––––––––––––––   ➡️ GitHub Repo (wg-easy): https://github.com/WeeJeWel/wg-easy docker images docker ps -a docker stop id docker rm id to check ...