-1

I am working on a linux server remotely. Are there any command that can allow me to figure out the IP address of this linux server, so that I can ftp some files to this server.

2 Answers2

0

if the remote machine is directly connected to the internet:

hostname -I|cut -f1

otherwise, one of these:

wget -qO - http://whatsmyip.me/
wget -qO - http://ipinfo.io/ip
wget -qO - http://ipecho.net/plain; echo

In all cases, must be run on the remote machine.

gogoud
  • 2,672
0

To get the IP:

hostname -i

IP along with hostname:

host $HOSTNAME