Connect to IT Web Hosting Servers via SSH with Terminal (Macintosh)

Terminal comes with the Mac OS X operating system and is used to access and run commands on remote computers and servers such as IT's Web hosting server. Terminal is SSH2-compliant and encrypts all data between a server and your personal computer.

The following instructions are based on Mac OS 10.8 (Mountain Lion). For other versions of Mac OS X, these steps may differ slightly.

Connect to IT's Web Hosting Server

How to Edit the Hosts File in Linux, Windows, or Mac {Updated}

Introduction

The hosts file in Windows, Mac, or Linux maps hostnames to IP addresses. For example, an intranet, like a corporate office that has servers for users to access, or it could be domain names for servers on the internet.

Editing your hosts file can be useful if you are running tests on your network. By mapping an IP address to a server name (or domain name), you can skip the process where a web browser uses a Domain Name Server(DNS) lookup to translate the domain name to the IP address.

In this tutorial, learn how to edit hosts file on Linux, Windows, or Mac.

Prerequisites

A system running Windows, Linux or macOS

Administrator privileges

How to Edit Linux Hosts File

Step 1: Open a Terminal Window (Command Line)

Most Linux distributions have an applications > utilities > terminal feature, or an option to right-click the desktop and click Open Terminal.

Step 2: Open the Linux Hosts File

To open the Linux hosts file, type the command:

sudo vim /etc/hosts

Instead of Vim, you can use any other text editor, like nano.

The system should prompt for your password – enter it, and the Hosts file should open.

Step 3: Modify the File

The hosts file in Linux is formatted so that the IP address is first, and the server name is second.

0.0.0.0

Add any entries you wish to the end of the file. If you make a mistake or need to tell your operating system to ignore a line, add the ‘#’ sign at the beginning of that line.

Make sure you save the file in Vim before you exit!

Step 4 (Optional): Name Service Switch

The hosts file bypasses the standard Domain Name Server lookup. In Linux, there’s another file that tells the operating system what order to look for the IP address translations.

The file is and if it’s configured to look at DNS first, then it’ll skip your hosts file and go straight to DNS lookup.

To check the configuration, in your terminal window type:

cat

The terminal will return a list of information.

About halfway down, there should be an entry labeled “hosts”. Make sure that the right-hand column lists files first. If for some reason DNS is listed first, open the file in your text editor:

sudo vim

It should open the file. For the hosts: setting, change the entry so that files is at the beginning of the entry, and dns is at the end.

Note: Check out our tutorial Linux sed Command: How To Use the Stream Editor to learn how to edit lines in a Linux text file without a text editor.

How to Edit Hosts File in Windows

Step 1: Open Notepad as an Administrator

You’ll need administrator privileges for this operation.

Click the Windows button and type “notepad.” Let the search feature find the Notepad application. Right-click the Notepad app, then click Run as administrator. Windows User Account Control should pop up asking, “Do you want to allow this app to make changes to your device?” Click Yes.

Step 2: Open the Windows Hosts File

In Notepad, click File> Open Navigate to c:windowssystem32driversetc In the lower-right corner, just above the Open button, click the drop-down menu to change the file type to All Files. Select “hosts” and click Open.

Step 3: Edit the File

The Windows hosts file is that it gives you a brief explanation of how to write a new line. Here’s a brief breakdown:

0.0.0.0

The first set of four (4) digits is the IP address you’re mapping. This could be the internal IP address of a server on the network, or it could be the IP address of a website.

The second label is the name you want to be able to type in a browser to access the server at the IP address you just specified.

Once you’re finished making your changes, save the file (File > Save) and exit.

If you make an edit to the hosts file and something stops working, you can tell Windows to ignore any line by putting a # sign at the beginning of that line.

It would look like:

# 0.0.0.0

How to Edit Mac Hosts File

Step 1: Open the Mac Terminal

Open the Finder, and go to Applications > Utilities > Terminal

Type the following in the terminal window:

sudo nano /private/etc/hosts

The system should prompt you to enter your password – this is the same password you use to log in to the system. Type it in, and hit Enter.

Step 2: Edit Mac Hosts File

The IP address is first, and the server name comes second. Comments are indicated with a ‘#’ sign. Consider the example below:

0.0.0.0

Enter the IP address you want to refer to first, hit space, and then the server name (or domain name) that you want to associate with it.

If you make a mistake, you can tell Mac OS to ignore a line by typing a # at the beginning of that line.

Save your changes by pressing Command + O, then exit by pressing Command + X.

Conclusion

Editing the hosts file in Windows, Mac, or Linux operating system is a simple task.

It’s especially handy that the file looks the same, no matter which you’re running! Just make sure you know the IP address of the server you want to connect to, and then specify the name you want to type into a browser, and you’ll be on your way!

¿Qué es una transferencia de archivos y cómo funciona?

La transferencia de archivos comenzó en la década de los 70s, cuando la gente empezó a mirar más allá de los disquetes para distribuir contenido digital. Una de las primeras plataformas de intercambio de archivos en línea fue Usenet, un tablero de anuncios electrónico que permitía a los miembros de la comunidad publicar noticias. La funcionalidad permitió a los usuarios compartir archivos de datos con otros en el grupo de noticias.

En 1985, se estableció el primer protocolo de comunicaciones, FTP. El estándar de transferencia de archivos permitía a los usuarios transmitir datos entre diferentes sistemas informáticos utilizando el mismo conjunto de reglas y sintaxis.

En la década de los 90s, Internet abrió las comunicaciones en todo el mundo, lo que permitió a las personas compartir información a través de una red masiva de computadoras. America Online (AOL) se convirtió en uno de los primeros proveedores de servicios de Internet. Ofrecía una plataforma de e-mail basada en suscripción con una gama de servicios web, incluida la transferencia de archivos.

El sitio de música Napster se creó en 1999, lo que permite a los usuarios compartir archivos de audio mp3 con sus compañeros. El primer año, tuvo 4 millones de canciones en circulación. 2 El sitio generalmente se le atribuye ser el primer servicio de intercambio de archivos de igual a igual. Allanó el camino para otras redes de intercambio como Gnutella y Freenet a principios de la década de 2000.

Hoy en día, se encuentran disponibles muchas soluciones de transferencia de archivos de alta velocidad para administrar el flujo de información digital. Los sistemas de almacenamiento en la nube como Dropbox e iCloud permiten a los usuarios almacenar archivos digitales de todo tipo (incluidas fotos y videos) fuera del sitio. Con el servicio, las personas pueden acceder y transferir archivos desde cualquier dispositivo a cualquier dispositivo.

Copyright y seguridad

La transferencia generalizada de archivos y el intercambio de contenido digital ha presentado desafíos éticos y legales a lo largo de los años. Según Wikipedia: "El intercambio de archivos plantea problemas de derechos de autor y ha dado lugar a muchas demandas legales. Por ejemplo, en un caso, la Corte Suprema de los Estados Unidos dictaminó que los creadores de redes peer-to-peer pueden ser considerados responsables si su software se comercializa como una herramienta para infringir los derechos de autor". 3

La seguridad de la transferencia de archivos también es un tema crítico. Una encuesta reciente de Digital Shadows descubrió 1.500 millones de archivos de datos expuestos a través de FTP mal configurados, sincronización remota de archivos y directorios (Rsync) y otros sistemas de transferencia de archivos. "La gran exposición de datos incluye documentos que abarcan datos de nómina, información sobre declaraciones de impuestos, registros médicos, datos de tarjetas de crédito y propiedad intelectual". 4

Las filtraciones de datos y las transferencias fallidas pueden afectar los resultados y la reputación de una organización. De acuerdo aun estudio de IBM Security y el Poneman Institute (PDF, 1,6 MB), el costo promedio de una violación de datos en 2018 fue de $3.86 millones. Costo estimado por cada registro perdido o robado: $148.

Post a Comment