Useful shortcuts for vi editor

Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Friday, 18 October 2019

e.g. preparing multiple virtual machines in local network

Hostnames: VM node-A, VM node-B, VM node-C

Adapter 1: Host-only Adapter (VirtualBox-Host-Only Ethernet Adapter)
Type -> Paravirtualized network adapter (virtio-net) - Deny Mode

Adapter 2: Bridged Adapter (Intel Ethernet Connection)
Type -> Paravirtualized network adapter (virtio-net) - Deny Mode

Test
Try to connect one of VMs such as "node-A" by SSH

Wednesday, 31 October 2018

How to connect into local VM via SSH?

* Set a new Port Forwarding Rule in Network Settings

Step 1: Settings -> Network -> Adapter 1 -> Advanced -> Adapter Type -> "Paravirtualized network adapter (virtio-net)" -> OK

Step 2: Settings -> Network -> Adapter 1 -> Advanced -> Keep it as "NAT" -> Click "Port Forwarding" -> Define a Rule -> OK
e.g.
Name Protocol Host Port Guest Port
SSH TCP      1022 22

SSH Connection Host/Port Settings:
Host: 127.0.0.1
Port: 1022

Monday, 29 December 2014

How to change ssh welcome message?

Execute below operations as root user.

1. vi /etc/ssh/sshd_config
# comment out Banner row
# no default banner path
Banner /etc/ssh/ssh-banner-message.txt

2. vi /etc/ssh/ssh-banner-message.txt
# add a new message to text file

3. service sshd restart
# restart ssh service to see banner message