Difference between hostname and user login name

i have set my hostname as x.server.com and as a user in which i login is server.
what if i ssh/scp/cp x.server.com@192.168.4.10(does not work) and server@192.168.4.10.
the latter works. could you please clear my doubt.

but the proper syntax is like
scp hostname@ip: / location of the file location of the file in host system
eg: i copy t.txt from host to server
scp x.server.com@192.168.4.10:/home/server/Desktop/t.txt /home/host/Desktop/r.txt(doesnt works)
scp server@192.168.4.10:/home/server/Desktop/t.txt /home/host/Desktop/r.txt(works).

Hostname is a name of your “host”, eg:

[root@08199afc4756 etc]# hostname
08199afc4756

User: root:
hostname: 08199afc4756

USER@HOST or USER@IP

Hi,

Hostname is nothing but machine name , Yes this command is right and it will work only when you configured fully qualified domain name. FQDN

In order to understand FQDN you have little bit knowledge on DNS. I will give small explanation i hope it will help you.

  1. x.server.com@192.168.4.10:/home/server/Desktop/t.txt /home/host/Desktop/r.txt is not working only because of it not configured properly.

  2. I need clarification on below 2 commands

scp x.server.com**@192.168.4.10:/home/server/Desktop/t.txt /home/host/Desktop/r.txt(doesnt works)

x.server.com@192.168.4.10 // command syntax is wrong

scp server@192.168.4.10:/home/server/Desktop/t.txt /home/host/Desktop/r.txt(works).

server is an username here not an hostname.

thanks a lot…it helped understanding better …
and yes the syntax which i used was wrong…
:slight_smile:

thank for your time and help…
:slight_smile:

Hi,

Hostname it just name of machine and its for identification,login name is based on local account of the machine or if it is domain then this will be domain account.