PDA

View Full Version : exiting/saving VI


caspert_ghost
15th May 2007, 10:03
Hellllllp

I have been reading:
http://www.howtoforge.com/perfect_setup_ubuntu704_p3

and got ubuntu 7.04 server set up on my machine. but when I get to 6 (Configure The Network)
I enter my login, type sudo to log in as root then type the command stated on that page.
vi /etc/network/interfaces

I get the new window:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

now I need to change this to:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1


once I make the changes HOW do I save it and exit from the vi command window???
Thank you

Hans
15th May 2007, 10:33
To exit VI:

press ESC to make sure you are in command mode.

Press :wq to write (save the file) and quit

or

Press: Type :q or :q! to quit without saving the file

caspert_ghost
15th May 2007, 13:05
Thank you for your prompt help.
I was able to get it doen.

Next:
on the same page it refers to using PuTTy to log into my server.
Do I get the windows XP version and install it then connect using the ip I set up :192.168.0.100 ??

Hans
15th May 2007, 13:21
You can download the Putty version for Windows here:
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

After downloading Putty, you are able to setup a connection from your local desktop to your server via SSH.
This is more secure then Telnet.

Within Putty, enter your the IP-address of your server.
You can enter it with a valid username and password, like admin or root.

If you are local desktop is in the same LAN as your server use IP address 92.168.0.100 in Putty.
If you want to establish a SSH connection from outside (Internet) use the external IP address of the network, which also contains your server.
If your server is behind a Router. make sure that port 22 is open and forwarded to your server within your LAN.

caspert_ghost
15th May 2007, 14:27
Hello again. Thank you, I have downloaded the PuTTy file and double clicked it.
entered 192.168.0.100 and hit open;
after about 30 seconds I get a "fatal error"
Network Error:connection timed out.

I should point out that I have this installed on the same pc as I am using to talk to you as a microsoft virtual pc.

falko
16th May 2007, 16:42
Is 192.168.0.100 the IP address of your Ubuntu server?
What subnet are you using in your LAN? Is it 192.168.0, 192.168.1, ...?

caspert_ghost
19th May 2007, 17:09
172.16.8.15

the dhcp allocates IPs based on mac address.

falko
20th May 2007, 17:58
172.16.8.15

the dhcp allocates IPs based on mac address.
Then you must assign an unused IP address from your 172.16.8 subnet to the Ubuntu box. 192.168.0.100 doesn't work because it's from a completely different subnet.