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@ not work) and server@
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@ /home/host/Desktop/r.txt(doesnt works)
scp server@ /home/host/Desktop/r.txt(works).

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

[root@08199afc4756 etc]# hostname

User: root:
hostname: 08199afc4756



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@ /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**@ /home/host/Desktop/r.txt(doesnt works)

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

scp server@ /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…

thank for your time and help…


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.