How to operate Linux from the outside Procedure

[Learning environment]

Redhot series: CentOS Ssh connection software: TeraTerm Virtual machine: VirtualBox

【Overview】

How to access virtual local Linux with SSH

When accessing Linux using TeraTerm You must allow access from the outside.

"Set up CentOS network"

【procedure】

  1. Set user privileges to root
  2. Edit the file for network settings
  3. Make network settings
  4. Connect with TeraTeam

[Details]

1. 1. Set user privileges to root

Execute $ su-(space between su and-)

root privilege command


$su -

You will be asked for your password. password is the password to log in to the host user (login screen) If you successfully become the root user here The symbol ($) waiting for a command command changes to #. スクリーンショット (418).png

2. Edit the file for network settings

Type the following command and press Tab instead of Enter.

# vi /etc/sysconfig/network-scripts/

Then, two patterns of screen display will appear, so it corresponds to each Please proceed with the pattern. (Tab key is a command that shows the next input candidate)

―――――――――――――――――――――――――――――― [Pattern 1] スクリーンショット (423).png

For the above pattern, look for ifcfg- ○○ and ifcfg-lo describe ifcfg- ○○ after # vi / etc / sysconfig / network-scriprs /

# vi /etc/sysconfig/network-scriprs/ifcfg-○○

After filling in the above, press Enter to move to [Editing Procedure]. ――――――――――――――――――――――――――――――

[Pattern 2] スクリーンショット (424).png

After filling in the above, press Enter to move to [Editing Procedure]. ―――――――――――――――――――――――――――――― [Editing procedure] The file to be edited this time is the ifcfg- ○○ file. By the way, ○○ is the setting file name of the network interface for connecting to the outside. It depends on the person, so you don't have to worry about it. スクリーンショット (426).png

When the above screen appears, follow the steps below.

  1. Press the i key to enter input mode
  2. Change ONBOOT = no at the bottom to yes
  3. Press Ctrl + C (or Esc) to cancel the input mode 4: Save the edit with the wq command and exit

3. Make network settings

Select "Virtual Machine"> "File" at the top right of the screen

"Network"> "Advanced"> "Port Fording"

Add settings. Host port: 3333 Guest port: 22 (Port number to connect with SSH)

Reboot when the settings are complete

# reboot

4. Connect with TeraTeam

Start TeraTerm

スクリーンショット (427).png

Host:127.0.0.1:3333 TCP post# : 22

Set the number added in the network settings

スクリーンショット (428).png

Select Continue

スクリーンショット (429).png

After adding "User name" and "Passphrase" Select OK (* User name and password of the host created "User name" and "Passphrase")

That's it.

Recommended Posts

How to operate Linux from the outside Procedure
How to operate Linux from the console
How to access the Datastore from the outside
[Linux] How to use the echo command
How to handle Linux commands well from Python
How to measure line speed from the terminal
How to operate NumPy
[Python] How to remove duplicate values from the list
How to create an article from the command line
How to "cache enabled" access to FPGA memory from Linux
How to instantly launch Jupyter Notebook from the terminal
How to post a ticket from the Shogun API
(Remember quickly) How to use the LINUX command line
How to use the decorator
How to increase the axis
How to start the program
How to calculate the amount of calculation learned from ABC134-D
How to log in automatically like 1Password from the CLI
How to do the initial setup from Django project creation
How to hit NAPALM from the Web (NetDevOpsSec reality solution)
After all, the story of returning from Linux to Windows
How to calculate the autocorrelation coefficient
How to use the zip function
How to use the optparse module
How to use SWIG from waf
How to install wkhtmltopdf (Amazon Linux2)
How to install VMware-Tools on Linux
How to read the SNLI dataset
How to get the Python version
How to install MBDyn (Linux Ubuntu)
[linux] kill command to kill the process
[Python] How to import the library
How to launch Explorer from WSL
How to overwrite the output to the console
How to access wikipedia from python
How to convert from .mgz to .nii.gz
How to check Linux OS version
How to use the ConfigParser module
How to get the printer driver for Oki Mac into Linux
How to get followers and followers from python using the Mastodon API
[Linux] How to disable the automatic update of the /etc/resolv.conf file (AmazonLinux2)
[EC2] How to install and download chromedriver from the command line
How to output the output result of the Linux man command to a file
How to extract the desired character string from a line 4 commands
How to resolve the error from toimage (from PIL.Image import fromarray as toimage)
How to display the progress bar (tqdm)
How to build my own Linux server
From the introduction of GoogleCloudPlatform Natural Language API to how to use it
How to create a clone from Github
[Linux] How to subdivide files and folders
How to use the Spark ML pipeline
How to easily convert format from Markdown
[Linux] Flow from power-on to PC startup
How to install aws-session-manager-plugin on Manajro Linux
How to check local GAE from iPhone browser in the same LAN
How to check the version of Django
How to solve the bin packing problem
How to update Google Sheets from Python
Learning record (4th day) #How to get the absolute path from the relative path
How to set the server time to Japanese time
I want to know how LINUX works!