How to change my IP address when using SSH?

I have a server with a firewall configured to only accept certain IP addresses for SSHing.  I'm not at my apartment using my IP address that I can access it with.  But I do know my IP address at my apartment.

Is it possible to use SSH and give it the IP address I want to use?

Thanks for any help!
Who is Participating?
You generally can't just use an IP address of another device - that would create all sorts of issues. However, have you considered SSHing to a computer that can SSH to the server?

As in Computer At Your AparmentSSHComputer that can access serverSSHServer?

Otherwise, asidu is right, just change the firewall to allow access from your apartment IP.
<<I have a server with a firewall configured to only accept certain IP addresses for SSHing>>
The blocking of the IPs is done by the firewall.
Hence you must modify the firewall rules to allow access of the IP from your apartment.

Once you are able to get pass the firewall you should be able to SSH.

parlaysAuthor Commented:
I might not have been clear, im not at my apartment, which has an IP that can access the server.  At my current location, can I spoof or use that IP by manually typing it somewhere?
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

No you can't

If you pretend to have another IP-address, then the ssh servers ansers would be setn back to this IP-address and not to the host you're connecting from.

Spoofing an IP address is pretty tricky to do, from what I understand.  In the event that you could, would you really care about only allowing those certain IP's anymore?

If you're worried about script kiddies breaking into the server, here are measures that minimize the server's attack surface while giving the most flexibility:
 1.) configure the firewall to forward a non-standard port to your server's SSH port (22).
 2.) use something like denyhosts [ ] to block abusers
 3.) disallow root access

Allowing root access on the standard SSH port is the surest way of having the server compromised.  The above tactics are the most secure method I've found without having to go so far as to using IP-based access (which can really go wrong if you only allow your home IP to access, then it changes).
Basically, NO.

The IP address that belongs to your apartment even if it is from the same ISP that you are connected right now cannot be used elsewere. I you can Spoof the IP address (make believe that you have that IP address) it may get there, but on the way back (the ACK of the TCP session) it will go back to the original device that has that IP.

hope that help..
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.