4

I managed to follow all the steps to create EC2 instance and install R Server on it.

But now when I go to RStudio to connect (which looks something like "ec2-[Public IP]-.eu-west-3.compute.amazonaws.com:8787") I am asked a username and a password but I did not configure any:

enter image description here

I tried rstudio (username) and rstudio (password) but it does not work. Anyone knows how I can find the username and the password to connect? Thanks. M

ML_Enthousiast
  • 1,147
  • 1
  • 15
  • 39
  • I'm having the same problem when launching an RStudio image from AWS Marketplace. I asked [here](https://community.rstudio.com/t/cannot-log-in-to-aws-rstudio-server-and-workbench-instead-see-error-unauthorized-user/126381) and will provide an answer here if I figure out what's going on.. – stevec Jan 14 '22 at 02:21

3 Answers3

3

If this is using the AMI from http://www.louisaslett.com/RStudio_AMI/, the default password recently changed to the instance ID of the EC2. A code starting with i- and 17 alphanumeric characters, for example.

Username is still rstudio.

shiro
  • 578
  • 3
  • 9
  • 1
    I've tried this username and my instance id as password combo, but it is not working at the moment (Error: Incorrect or invalid username/password). so I will burn it down and try again. – Mark Neal Sep 07 '21 at 06:12
  • I did burn my previous instance down, started a new one, but made a new key pair and I can now login to RStudio on AWS. Only other thing I changed was a smaller instance. Following instructions from here: makinhttps://jagg19.github.io/2019/08/aws-r/ – Mark Neal Sep 07 '21 at 06:23
1

You can create a user/password in Linux and use it to log in

#add user(s)
useradd username
echo username:password | chpasswd 

here is a detailed blog from on running R on AWS

0

I was having the same issue (I believe there is no ubuntu password for an AWS EC2 Instance and R studio requires one).

You can add a new user by typing the following: sudo adduser YOURUSERNAME and follow the terminal instructions (press enter to skip the info you do not want to give). Head over to the IP xxx.xxx.xxx.xxx:8787 and you should be able to log in now.

How to install R studio 3.4.4, upgrade to 3.6.0 and add a username (Ubuntu 18):

sudo apt update
sudo apt-get install -y r-base r-base-dev

sudo apt install gdebi-core

wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1335-amd64.deb


sudo gdebi rstudio-server-1.2.1335-amd64.deb

sudo chmod 777 -R /usr/local/lib/R/site-library

sudo adduser YOURUSERNAME

#########
# Upgrade R
echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" | sudo tee -a /etc/apt/sources.list

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

sudo apt-get update
sudo apt-get upgrade -y

sudo apt-get install -y r-base r-recommended r-base-dev

# Rstudio dependency issues (when installing devtools) - I installed from an AWS EC2 account so I need to change my root password.

sudo passwd root
su root
apt-get -y build-dep libcurl4-gnutls-dev
user113156
  • 6,761
  • 5
  • 35
  • 81