?
Solved

changing IP from SSH

Posted on 2005-03-02
5
Medium Priority
?
284 Views
Last Modified: 2010-05-18
What is the command to change the IP from a ssh session?
ifconfig something?

Thanks

ps: this is on redhat 9
0
Comment
Question by:dissolved
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 88

Accepted Solution

by:
rindi earned 2000 total points
ID: 13445772
Yes, it is ifconfig:

ifconfig eth0 xxx.xxx.xxx.xxx

you can get more info on ifconfig with man ifconfig or info ifconfig. You either have to be root to use ifconfig or use the full path, ie /sbin/ifconfig

Also be aware that if you change the IP of the interface you are connected to via SSH, you will loose the connection until you reconnect with the new IP.
0
 

Author Comment

by:dissolved
ID: 13445782
thanks. how do I change the netmask and gateway?
0
 
LVL 88

Expert Comment

by:rindi
ID: 13446108
To set the gateway:

route add default gw xxx.xxx.xxx.xxx

to set the netmask:

ifconfig eth0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx

0
 
LVL 88

Expert Comment

by:rindi
ID: 13446111
And thanks.
0
 

Author Comment

by:dissolved
ID: 13446258
u da man
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question