H
H
heducose2017-07-27 15:23:04
linux
heducose, 2017-07-27 15:23:04

Is it possible to log in via ssh under different IPs from the same console?

Is it possible to change the IP under which ssh logs in to the VPS server?
Those. opened the console - logged in under one IP on one machine.
Opened the second one - logged in under another IP.
VPN here, of course, does not roll, because it wraps all the traffic of the entire machine.
Perhaps a proxy?
Is it possible to wrap the traffic of one specific console, one ssh session?
Ubuntu working machine.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vladimir Zhurkin, 2017-07-27
@heducose

Is it possible to change the IP under which ssh logs in to the VPS server?
Those. opened the console - logged in under one IP on one machine.
Opened the second one - logged in under another IP.
The easiest way is to make a double tunnel.
It will be something like this (It's called Multiple SSH Tunnels)
you_ip - other_server1 - need_server
you_ip - other_server2 - need_server
etc.
Yes, I would not paint here, there are a lot of examples in the articles.
https://www.stableit.ru/2010/10/ssh_19.html
https://superuser.com/questions/96489/an-ssh-tunne...
If we are talking about a situation where you have several ips on a machine , then no. SSH does not allow you to choose an interface or ip from which you can make a connection. Maybe other clients do. dropbear or mosh

L
laxikodeje, 2017-07-27
@laxikodeje

Under what such "another IP"???
Usually there are only 2 IPs - client address and server address.
Let's say you have 10 different IPs on your server.
And on all 10, the SSH demon is listening.
Then yes, it is possible.
Otherwise, what kind of "other IP" do you mean?????
Wrap traffic - do you mean tunnels?
You can wrap the tunnel anywhere.
And yes, the tunnel is tied to one SSH session.
But everyone from the client can use tunnels.
Not everything. And depending on the settings.
I currently have 2 VPN connections enabled at the same time. Part of the traffic goes directly to the Internet, part to VPN No. 1, part to VPN No. 2. And I didn’t have to configure anything for this. It's just that the admins of those VPNs configured them correctly - do not touch other people's traffic.

V
Vladimir Dubrovin, 2017-07-27
@z3apa3a

Yes, you can, using external proxies or tor.

V
Va1ery, 2017-07-28
@Va1ery

I support Saboteur
Add an interface for each remote machine through which you will connect

ip route add 8.8.8.8 dev eth0
ip route add 8.8.8.9 dev eth1
ip route add 8.8.8.10 dev ppp0

If the task is to use a random interface, write a script that will correct the routing and create a connection. The established connection will work from the old ip until the connection is broken.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question