Author Topic: Why Does My Ubuntu Machine always attempt to login with Root access  (Read 1357 times)

0 Members and 1 Guest are viewing this topic.

Offline cpatte7372

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
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:

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17743
  • Karma: 457
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Why Does My Ubuntu Machine always attempt to login with Root access
« Reply #1 on: June 16, 2018, 05:08:08 pm »
it'll default to root unless you specify a user account to log in as .. as in:-
Code: [Select]
ssh packt@centos
Code: [Select]
ssh packt@<ip.address.of.server>
or if you're using a non-default port:-
Code: [Select]
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)
« Last Edit: June 16, 2018, 05:14:32 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.


SimplePortal 2.3.3 © 2008-2010, SimplePortal