XNAT VM login username/password

133 views
Skip to first unread message

Emanuel Adams

unread,
May 19, 2020, 1:38:16 PM5/19/20
to xnat_discussion
cloned the xnat-vagrant repo. What is the username/password to login to the VM?

Thanks.

Herrick, Rick

unread,
May 19, 2020, 2:56:19 PM5/19/20
to xnat_di...@googlegroups.com

Presuming you mean the XNAT instance running on the VM, it’s admin/admin.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

Phone: +1 (314) 273-1645

 

From: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com> on behalf of Emanuel Adams <eaf...@gmail.com>
Reply-To: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com>
Date: Tuesday, May 19, 2020 at 12:38 PM
To: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] XNAT VM login username/password

 

* External Email - Caution *

cloned the xnat-vagrant repo. What is the username/password to login to the VM?

 

Thanks.

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/fad309e5-d2bb-4a4f-b474-1640f90ed1f7%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Emanuel Adams

unread,
May 22, 2020, 5:47:08 PM5/22/20
to xnat_discussion
I used "vagrant ssh" to login into VM  - thanks. 

Emanuel Adams

unread,
May 22, 2020, 5:48:04 PM5/22/20
to xnat_discussion
I used "vagrant ssh" to login into the VM  - thanks. 


On Tuesday, May 19, 2020 at 1:56:19 PM UTC-5, Herrick, Rick wrote:

Presuming you mean the XNAT instance running on the VM, it’s admin/admin.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

Phone: +1 (314) 273-1645

 

From: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com> on behalf of Emanuel Adams <eaf...@gmail.com>
Reply-To: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com>
Date: Tuesday, May 19, 2020 at 12:38 PM
To: "xnat_di...@googlegroups.com" <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] XNAT VM login username/password

 

* External Email - Caution *

cloned the xnat-vagrant repo. What is the username/password to login to the VM?

 

Thanks.

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_di...@googlegroups.com.

Herrick, Rick

unread,
May 26, 2020, 10:32:57 AM5/26/20
to xnat_di...@googlegroups.com

Ah, yeah for ssh access that works. You can also add a public ssh key to the authorized_keys file in ~/.ssh for the xnat user. I add a public key there, then configure the VM in my ~/.ssh/config file:

 

Host xnatdev xnat-release

    HostName        %h.xnat.org

    User            xnat

    IdentityFile    ~/.ssh/id_ed25519

    ForwardAgent    yes

 

The nice thing here is that I can have multiple VMs configured (here xnatdev and xnat-release) and access them without changing to the Vagrant folder for each:

 

$ ssh xnatdev

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/2d5bbe94-ab91-4f82-a161-aeef7c97d4e1%40googlegroups.com.

angel.m...@gmail.com

unread,
Jul 5, 2021, 3:13:53 AM7/5/21
to xnat_discussion
Hi I'm trying to run this on Windows. The instructions for accessing the VM that come with the code don't work. I'm wondering if you could elaborate a bit on you instructions above or if you could help me troubleshoot given the info below. For example do your instructions directly translate to Windows? I don't have an xnat user on my windows machine. I can't edit anything on the VM because of course I haven't managed to ssh into it yet. If the xnat user you are referring to is somewhere in the vagrant set up do you know where I might find it's ~/.ssh? Also it looks like vagrant is using a private key for identification but where is the public key? 

Instructions provided with code are...
If you'd like to access the XNAT VM via SSH, run this command from the `'xnat_vagrant'` folder

```bash
vagrant ssh
```
This doesn't work as there is no vagrant file in xnat_vagrant

Then switch to the VM user (**`xnat`** in this case) after you're logged in:

```bash
sudo su - xnat

If I find out the id of the vagrant VM and then try with that I get the following
$ vagrant ssh e44595d
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: C:/Users/user/xnat-vagrant/configs/x
nat-dev/Vagrantfile
Line number: 0
Message: Errno::ENOENT: No such file or directory @ rb_sysopen - ../../scripts/Vagrantfile

If I go into the subfolder that has the vagrant file I used to povision the VM and try vagrant ssh I get asked for a password that I don't know. 
If I type vagrant ssh-config then I get the following info. The info below looks to me like I should not be asked for a password at all. 

$ vagrant ssh-config
[ ssh-config ]

Loading existing configuration from C:/Users/user/xnat-vagrant/configs/xnat-dev/.work/vars.yaml...
Host xnatdev
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile C:/Users/he100044/ProjectDiaries/XNAT_collaboration/VM_code/xnat_vagrant/xnat-vagrant/
configs/xnat-dev/.vagrant/machines/xnatdev/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL


thanks in advance
Any help much appreciated

Herrick, Rick

unread,
Jul 6, 2021, 12:32:39 PM7/6/21
to xnat_di...@googlegroups.com

There are a couple of ways you can access the Vagrant VM from Windows:

 

The vagrant command you mentioned should work, but you need to invoke in the folder for the configuration you’re running (e.g. configs/xnat-dev). So from the root folder for the xnat-vagrant repo, you could do:

 

cd configs/xnat-dev

vagrant ssh

 

That doesn’t require having anything in ~/.ssh/config or anything else: Vagrant sets up its own public/private key pair.

 

The issue with doing vagrant ssh vm_id is that Vagrant can find the original Vagrantfile located in the configuration folder but those Vagrantfiles all reference ../../scripts/Vagrantfile, so trying to resolve that by a relative path fails unless you’re already in one of the configuration folders…

 

You can also use the run script in the root xnat-vagrant folder. I’ve attached a trimmed down log that shows creating a new instance of a VM then ssh’ing into it using the run script.

 

One other thing you can do is to specify a public key in the file local.yaml in your configuration folder, so e.g. configs/xnat-dev/local.yaml. The line to specify the public key looks something like this:

 

public_key:     ~/.ssh/id_ed25519.pub


Then I have this in my ~/.ssh/config file:

 

Host xnatdev

    HostName        %h.xnat.org

    User            xnat

    IdentityFile    ~/.ssh/id_ed25519

    IdentitiesOnly  yes

    ForwardAgent    yes

 

With that I can just do:

 

$ ssh xnatdev

Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64)

 

* Documentation:  https://help.ubuntu.com

* Management:     https://landscape.canonical.com

* Support:        https://ubuntu.com/advantage

 

  System information as of Tue 06 Jul 2021 04:31:37 PM UTC

 

  System load:  0.03              Users logged in:          0

  Usage of /:   7.2% of 61.31GB   IPv4 address for docker0: 172.17.0.1

  Memory usage: 16%               IPv4 address for eth0:    10.0.2.15

  Swap usage:   0%                IPv4 address for eth1:    10.1.1.170

  Processes:    131

 

 

This system is built by the Bento project by Chef Software

More information can be found at https://github.com/chef/bento

 

The programs included with the Ubuntu system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

 

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by

applicable law.

 

xnat@xnatdev:~$

 

HTH…

 

-- 

Rick Herrick

XNAT Architect/Developer

Computational Imaging Laboratory

xnat-dev.log
Reply all
Reply to author
Forward
0 new messages