Why Does My Ubuntu Machine always attempt to login with Root access

Hello Community,

Can someone let me know why whenever I attempt to ssh to a remote machine, from my ubuntu machine, it always attempts to login as root? For example, when I attempt to ssh to machine centos3, from ubuntu machine, it attempts to login as root@centos, as opposed to user as packt@centos3

root@7cdf7a551341:/data/web-app# ssh centos3
root@centos3’s password:

it’ll default to root unless you specify a user account to log in as … as in:-

ssh packt@centos


ssh packt@<ip.address.of.server>

or if you’re using a non-default port:-

ssh packt@<ip.address.of.server> -p <port number>

but that user account must exist on the remote PC/server.
(you’re not logging on WITH the local account, you’re logging on TO an account on the remote PC/server)

The info is good to know!