Suse Linux: getting a static IP

0

I am using a computer remotely to which I also have root access. This computer is connected to the internet, but I want to do ssh access, etc. Currently I am using TeamViewer to connect to it.

I tried this article and I think, this one is same as this SO post. I also saw few posts on Super User, but I still could not get the answer.

Solutions required disconnecting from the internet connection and even after that, I could not succeed. Next time, the internet would not start and I'd have to undo the changes.

Is there a way to accomplish Static IP, without discontinuing the current internet connection, if possible.

user984260

Posted 2011-12-24T20:49:46.390

Reputation: 189

Answers

0

From the question you posted on stack overflow i think you are talking about your local network, not about the internet.

there are multiple reasons:

  1. this issue is strongly related to the configuration of your router and i am pretty sure there are some router setups that disallow a user to choose his own IP.

  2. you have to stay in the same subnetwork as the router as well, for a subnetmask of 255.255.255.0 with a router on 192.168.1.0 you can only use adresses ranging from 192.168.1.1 to 192.168.1.254. (192.168.1.255 is the broadcast adress) a machine on 192.168.0.x would not be able to communicate with the router.

  3. if you are using dhcp (dynamic IP) in your local network your IP shouldn't change unless you are offline for a longer period of time or there are many different computers using the network (like on a campus network). maybe just find out your machines dynamic ip with ifconfig or if you are offline for long time set the lease time on the router to a higher value.

Baarn

Posted 2011-12-24T20:49:46.390

Reputation: 6 096

Thanks for your answer. My need is that, I want to use ssh instead of using teamviewer. The current IP is such that it does not allow remote ssh. Can you help in this regard. Also, let me know, if I need to post any router information here. – user984260 – 2011-12-25T16:15:26.763

1first of all: is the ssh-daemon installed and started? i am not sure how to do this exactly under suse, but something like sudo /etc/init.d/sshd start should work. – Baarn – 2011-12-25T16:22:17.877

Yes. I issued the command and it prints rsa/dsa key pair and says started ssh daemon. Can you direct from here on. – user984260 – 2011-12-26T16:25:37.660

1you should now be able to log in to that computer using ssh user@hostname where hostname is either the networkname or the ip-adress and username is a local on that machine. you should also read a guide about sshd and how to configure it propperly. – Baarn – 2011-12-27T14:29:34.187

Thanks. But still I am not able to ssh to that machine: it just waits forever. – user984260 – 2011-12-27T19:04:03.053

Can anyone suggest a non-gui alternative of teamviewer. Gui is very slow and I am not able to set-up ssh. Just peer-to-peer access would be sufficient for me. – user984260 – 2011-12-28T21:11:47.657