The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Hosts.allow and hosts.deny huddlestonsnk UNIX for Dummies Questions & Answers 1 10-18-2006 08:34 AM
etc/hosts or something else?? amon IP Networking 5 02-20-2006 12:05 PM
etc/hosts amon Security 1 01-24-2006 01:55 AM
hosts.allow & hosts.deny Sorrento UNIX for Dummies Questions & Answers 2 08-18-2005 06:25 PM
/etc/hosts tamemi UNIX for Dummies Questions & Answers 2 04-04-2003 01:42 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-13-2007
Registered User
 

Join Date: Feb 2007
Posts: 41
Stumble this Post!
Question /etc/hosts via ssh

Hi,

I want to change the /etc/hosts file on the hmc. I am connecting via ssh but any vi command is not allowed.

Can someone please let me know how to do this?

Many Thanks.
Kees
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-13-2007
DukeNuke2's Avatar
Soulman
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 1,310
Stumble this Post!
are you loged in as "root"?
Reply With Quote
  #3 (permalink)  
Old 02-13-2007
Registered User
 

Join Date: Feb 2007
Posts: 41
Stumble this Post!
yeah I am. well hscroot.
Reply With Quote
  #4 (permalink)  
Old 02-13-2007
DukeNuke2's Avatar
Soulman
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 1,310
Stumble this Post!
what is the output when you try a:
"vi /etc/hosts" ?
Reply With Quote
  #5 (permalink)  
Old 02-13-2007
Registered User
 

Join Date: Feb 2007
Posts: 41
Stumble this Post!
Quote:
Originally Posted by DukeNuke2
what is the output when you try a:
"vi /etc/hosts" ?
"-bash: vi: command not found" is what I get, sorry for being a complete idiot but i'm very new to all of this

I don't know any other editors that I can use as I've only ever vi.
Reply With Quote
  #6 (permalink)  
Old 02-13-2007
DukeNuke2's Avatar
Soulman
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 1,310
Stumble this Post!
try:
/usr/bin/vi /etc/hosts
and post the output off:
echo $PATH
Reply With Quote
  #7 (permalink)  
Old 02-13-2007
Registered User
 

Join Date: Feb 2007
Posts: 41
Stumble this Post!
Quote:
Originally Posted by DukeNuke2
try:
/usr/bin/vi /etc/hosts
and post the output off:
echo $PATH
Here you go.

hscroot@ehchmc01:~> echo $PATH
/hmcrbin/:/usr/hmcrbin
hscroot@ehchmc01:~> /usr/bin/vi /etc/hosts
-bash: /usr/bin/vi: restricted: cannot specify `/' in command names
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0