Can I SSH with a UID instead of a username? - openssh

So, I'm working with a software product that deploys as an OVA. They don't generate new SSH keys upon install, so every VM deployment has the same keys. And they allow key based login.
The admin user's uid is always 4001. The admin username is decided at the time the OVA is deployed.
Is there a way to connect via SSH specifying a UID on the remote system instead of a username? :)

Related

Where to find domain credentials for Jenkins 2.289.3 Windows Installer?

On my new Windows 10, as I am trying to install Jenkins, I encountered following prompt:
Since I don't know what local or domain user creds to enter, I keep on getting following error:
Error logging on DESKTOP-xxxx\user: The user name or password is incorrect
From reading the official doc, I am understanding that this is something new that Jenkins installer is doing for running as a Windows service, but where do I find these credentials on Windows?
Most of the applications when installed on Windows OS may want to run as a service using either the local system account or a specific account which needs specific permissions on the OS. Please use any local admin account which already there on the system where you are trying to install Jenkins. If the system is joined to a domain, prefer to use an domain account which has admin privileges on the system.
The worst advice to grand admin permissions for a single service.
You need to use local existing credentials from your windows system (if it's not connected to a domain) or a domain creds. Don't use admin creds for the installation.

MobaXterm use ssh passwords for server authentification

I want to create a MobaXterm user session to access a server via ssh.
I use a username and password for authentication. The option using the ssh key is unfortunately not available to me.
Furthermore, access to the server takes place via a jump server which is also protected with a username and password.
Under "Settings > Configuration > MobaXterm passwords management" I enabled "save ssh keys passphrases as well" and set "ask" for saving session passwords.
In the credentials section I created both credentials for accessing the servers with the requested username, password and as name the ip addr of the server.
How can I configure my user session to use these credentials to connect to the servers?

Lost .pem file. Need help connecting to EC2 remote server

My secretary created a new instance in Amazon using their EC2 server but lost the .pem file. Doing research online I was able to go to the instance system settings/get system log and retrieve some type of password there. The instance system log shows something like this:
2019/04/15 12:15:19Z: Username: Username
2019/04/15 12:15:19Z: Password: <Password>
It is a very long code of random characters.
Is there any way I can use this to log in via remote desktop or is there a way to decrypt it? I tried several decryption methods online and they said this was not a valid "hash"...whatever this means. I am not a technical person so I need hopefully a response in layman terms.
It appears that you are connecting to a Windows instance. When a new Amazon EC2 Windows instance is launched, a program on the AMI (disk image) automatically generates a random Administrator password. This is done so that you can access the instance, but nobody else can.
To keep the password secret, the program encrypts the password with the keypair nominated when the instance was launched. The encrypted password is passed back to AWS via the console. That is the string of 'random characters' you saw.
To decrypt the password, you can use the Get Windows Password feature, which requires you to supply the nominated keypair. It will then decrypt the password, which can be used to login to the instance as Administrator.
Since you no longer have the keypair, you cannot decrypt the password and therefore cannot login to the server. This is good! This proves that security works, because you would not want other people to be able to login to the server.
So, can do you regain access?
Refer to the steps on: I need to reset the administrator password on a Windows Server instance in Amazon EC2
Basically, there are two methods:
If Systems Manager is enabled for the instance, you can run a "rescue" script
Otherwise, there is a series of scripts that assist with the process of:
Detaching the disk
Attaching it to another instance
Resetting a configuration on the disk
Reattaching the disk to the original instance
The second process is a bit like plugging a USB disk into another computer to change a file (except that EC2 disks are managed differently).

How to replace/add key pair for a Windows EC2 instance

I have a running Windows server image on EC2.
I created an additional administrator login and have been using it login using RDP. Unfortunately I've lost the PEM file for the "Administrator" account and I've also disabled it for "safety"
Since I have access to the instance through an alternative administrative account I'm trying to figure out a few things:
Do need the "Administator" account PEM file in future?
If I get Amazon to generate a new PEM file using the same name that I currently have, how do I replace the "Administrator" key pair for the instance?
I've searched all over and can't find an answer on how to replace the key pair or add an additional key pair to a running "Windows" instance
Everything talks about shutting down and creating an new instance. I cannot shut down this server, so that must be a way to replace the key pair for the "Administrator" account.
I can't even find where Windows stores the key pair in a Windows server.
When an instance is first launched from one of the Amazon-supplied Windows AMIs, some code on the instance generates a random Administrator password. This password is then encrypted with the selected Keypair and passed back to AWS (you can actually see it in the System Log).
When you wish to first login to the instance, you will need to use the PEM to decrypt the Administrator password. You can then login to the Windows instance using that password.
It is recommended that you immediately change the Administrator password or connect the instance to Active Directory -- basically, follow your standard company security practices.
If you remember the password, you will not require the PEM file again. In fact, if you change the password, then even having the PEM will not facilitate access because it will only decrypt the original password, not the current password.
Bottom line: Ignore the PEM file. You still have administrative access to the instance, so you don't even need the Administrator account anymore. If you wish to use the Administrator account, simply use your existing administrative login to reactive it and set the password. There is no reason to panic and, actually, no reason to do anything.

Change root password of instance in Amazon EC 2 & Webmin

I have set up a website with the help of a System Admin on Amazon EC2. After the work, he installed a Webmin for me to handle the things like Control Panel. Now I need to reset the password for everything to keep things secure. For this:
(a) I have changed all users password including root user from Webmin interface
(b) Change the password associated with EC2 account.
But do it need to change the password of the EC 2 instance? Or it is already changed when I edited the password of the root user from Webmin ?
No, the password of the instances are unrelated to those of the amazon passwords. You'd be better of using key pairs than passwords for this reason.
The answer given by #HirenSagar is correct.
You cannot access your webmin instance without a password.
EC2 instances dont have passwords by default.
But you can side-step that by manually setting a password and user for your webmin.
First update your apt:
sudo apt-get update
Then:
sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpassword
Root is the webmin user and password is its password.
I think you should change the password of your instance it will protect your data from the hacker. Please set a strong password for your instance. A password should be a combination of uppercase letter (A,B,C,D), lowercase letter (a,b,c,d), numbers (1,2,3,4) and special character (#,#,&). A weak password is easily hacked by the hacker.
You can change the password of your instance by login into your AWS control panel:
Step 1: Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Step 2: In the navigation pane, choose Instances and then choose the instance that needs a password reset. ...
Step 3: Choose Actions, Instance Settings, Get System Log.
Step 4: Locate the EC2 Agent entry, for example, EC2 Agent: Ec2Config service v3.18.1118.
hi u could not change password of EC2, It has a Keypair, (.pem file to convert .ppk file through putty key generator) when u created EC2 instance From Aws,
make sure you have to give SSH Assess to your ip Address From Security Group (AWS-EC2-Inbound rules) then you can SSH from putty and manage Ubuntu terminal
User name Ubuntu, pass if created that or upload ppk for open terminal,
after login,
if u wann reset or change pass of webmin
you should try this
1 sudo apt-get update
2 sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpass;
3 sudo /etc/init.d/webmin restart

Resources