Hey, i am new to the boundary i have a small doubt to clarify and i am new to this software field
Under host we need to mention ip address of the target vm or our local machine?
My backend ip is 198.199.114.84, i applied on host and the default port is 22 but when i try to connect ut askes for apple@127.0.0.1 password and when i enter my local machine password it didn’t work when i enter target machine password also didn’t work i am getting permission denied i also checked the config file of vm and the remote login is enabled
Can anyone please help asap
The default port for an SSH target config should be the SSH port on the remote machine, however, when you connect to it you will get a random port assigned on localhost. So if you’re using the Boundary Desktop app and SSH’ing from say, a laptop, you would do something like ssh -p [random Boundary proxy port] [user]@127.0.0.1
. Without the option to tell ssh to connect to the Boundary proxy port, it will be connecting to your own local machine’s SSH. You would want to specify whatever the username on the remote host is for [user]
.
If you’re using the Boundary CLI, you can use the SSH connection overlay to do all that automatically:
boundary connect ssh -target-id [target ID] -username [user]
Hey @omkensey , thanks for the quick reply
i will explain my scenario
under host ip i added 198.199.114.84 which is vm ubuntu
under target default port i added 22
but when i try to ssh i am asked for password of niyog@127.0.0.1
my question is it should ask password for 198.199.114.84 right and i am using CLI
and when i enter the local pass it says permission denied, when i enter the vm password also it says permission denied
127.0.0.1 is correct – your SSH client is connecting to the Boundary proxy port locally and that connection is then forwarded through a Boundary worker to the target.
For the “permission denied”, if it’s an Ubuntu VM on a cloud provider, it probably doesn’t have your username as an account on it. The specific cloud provider’s docs would tell you what the default username is and you’d need to supply that as the -username
argument to boundary connect ssh
. Also are you sure the host has password login enabled for SSH connections? Many cloud provider VMs disable password-based SSH for security reasons even if the account itself has a password.
Thanks @omkensey , the problem is the user name as u said. In my case i am using contabo service and it was default username “root” and now i am able to connect to the target
Hai @omkensey , a small doubt when i want to access the VM other than root do i need to reg my name to that VM ?
You’ll need to create the non-root username on the host using whatever method you usually use on that cloud service, then you should be able to connect through Boundary using it.
Hai @omkensey , a small doubt regarding ssh i have seen some of the videos where they try to ssh without providing the username. How?