How to access same account using SSH and RStudio server with an EC2 instance - amazon-web-services

I'm trying to create a tutorial to teach users how to use a command line software package that we've developed with RStudio to analyze a preset collection of data files. To do this, I want to create AMI that comes with a directory that contains a number of files and is pre-loaded with the necessary software including RStudio server. To install RStudio server, I've been following Randy Zsitch's instructions and I'm able to login to RStudio using the user account. However, if the user is logged into RStudio, they can't see the default home directory (i.e. /home/ubuntu), their home directory (i.e. /home/rstudio) only has the R directory. I could certainly install the data files for the tutorial into /home/rstudio. However, if they SSH into the default account to access the command line software then they can't get the rstudio account without using sudo.
I'm looking for help to achieve one of two options...
Enable user to SSH into the EC2 instance using the rstudio account and password and access RStudio server with the rstudio account. Currently, I can seem to do this
Enable user to access RStudio server with the ubuntu account. This doesn't seem possible since the log in uses key-pair and not a password making it impossible to access RStudio server with a password since there isn't one.
I feel like I must be missing something obvious, but I'm still pretty new to the world of AWS. How do I set things up so that someone can directly log into the same account using RStudio server and SSH?

Related

How to download files onto personal computer from EC2 without knowing file name?

I want to use selenium to log into a private database and download some files. I can already do this via a python script that will launch a new chrome window (via selenium) and automatically download the files I need locally.
My python script uses selenium. Once the python script is run, it launches a google chrome window, which selenium then does some automatic clicking on to download files.
Now, I want to deploy my code to a web application so that I have a website online for others to use. I have my script on an Amazon EC2 instance and I call/invoke my script whenever a user on my website clicks a button. However, the files are downloaded onto the EC2 instance. I need these files to be downloaded on the person's personal computer after he clicks my button on my website.
Is there a way to achieve this, either by re-directing downloads? The file names are not known at runtime.
In summary, I have a script (which downloads files) on EC2 that is invoked when my button on my website is clicked. But I need the downloaded files to go onto the user's computer, not the EC2 instance/terminal.
Thank you in advance!
However, the files are downloaded onto the EC2 instance. I need these files to be downloaded on the person's personal computer
No there is no way to redirect downloads from an EC2 instance in the same way that you can't redirect downloads normally outside of AWS anyway.
When you download a file, you download it to the machine that requests the download.
Perhaps try returning the download URL in some way back to the UI and trigger the download yourself on the machine (if the URL does not need credentials). Or download the file, reupload to S3 and create a pre-signed URL that you can return to the UI.

XrmToolbox Connectivity issue with Dynamics 365 environment

I am trying to create connection on my XrmToolbox using Connection Wizard.
I am trying to establish connection with the Dev environment. I pass the the instance url and credentials. But, upon finishing the setup, the connection is switching to our prod environment. The org ID is switching to that of the prod environment.
I tried to use the url using my dev environment org unique name and it is still switching to my prod environment.
Url I'm pasisng: https://org2c******.crm.dynamics.com
It is switching to: https://orgd1******.crm.dynamics.com
I am tried with the previous version of XrmToolbox and I am still having the issue.
Please someone help me with this.
Try to confirm internal and display names. Also you can connect via SDK login Control, that will give you the ability to switch org.
This was an issue with user type in the AAD. I was setup as a guest user. this is why system was not allowing me to access the Dev environment from the XRMToolBox or Plugin Reg tool. This was sorted when my user type was changed.

AWS Lightsail terminal blocked

I installed WordPress on AWS Lightsail following aws’ video tutorial. Generated a static IP and watched the WP site running on the browser. To log into WP I have the user and have to retrieve the password using the terminal. To launch it I clicked the “Connect with SSH” button and a terminal pop-out. Unfortunately the terminal is blocked/freezed and I can’t write any command nor click into it. Restarted the instance and tried 4 browsers (IE, Chrome, Firefox, Safari) and nothing works.
I completely deleted the instance and created a new one but have the same problem.
Anyone know what’s happening and how to make the terminal work? Is there other way to get the wP password I need? Thanks.
The browser terminal interface can be problematic. It is better to use an SSH client (such as PuTTY). You will need the private key to do this (see instructions if you don't have this). The official bitnami instructions can be found here
https://docs.bitnami.com/aws/how-to/get-started-wordpress-aws-marketplace-intermediate/
If you don't have the WordPress password, these can be found in the initial installation logs, or in /home/bitnami/bitnami_credientials. Refer to Step 4 of the instructions
https://docs.bitnami.com/aws/get-started-marketplace/
Hope this helps.

Is possible deploy c++ web server on OpenShift3?

I am trying to deploy a c++ Http web server on OepnShift3 then I referred this.
The problem is:
Shall I put the source code on OpenShift or compile it first then put the executable file on OpenShift?
Is possible to access the OpenShift3 server via Xshell or Ftp?
Any way to get the OepnShift2 account?
It is no longer possible to get accounts on OpenShift 2.
For OpenShift 3, if you wanted to use a custom HTTP server you would need to be able to build a Docker image which includes it and any other files you need. If you can get the Docker image built, then you can deploy it to OpenShift 3.
Although you can get an interactive terminal in the container which runs your application, it doesn't work like traditional web hosting. That is, it isn't a shell access account where you would upload files using FTP or some other means.
Can you explain more about what it is you want to host? Depending on what you are doing there may be builder images already supported by OpenShift which can pull down files from a Git repository and build an image for you.
If OpenShift is new to you, I would suggest you try out:
https://learn.openshift.com
so you understand some of what it can do and how you interact with it.
Also grab down the free eBook and read it:
https://www.openshift.com/promotions/for-developers.html

Storing user's application preferences in Terminal Services Server session. Managed C++

Sorry if my question is silly, but I have no experience at all with terminal server and am having a problem on how to store user preferences for an app.
The application was originally designed to run in individual, independent, computers. The installer has the option to install for all users or the current user but it always stores some xml in a subdirectory of the commonapp folder of the computer. It does store it here to be able to write to it later on under Windows vista upward.
Now, the company is running terminal server and the users don't have an independent computer anymore. They log into a session of terminal server and the administrator decides what software they can use. As the app is now, it installs in the server and offers all the users the same preferences from the commonapp. If the preferences are changed for an user, they all will have the change...
Please, could someone illustrate me on this? Initially, I though that by choosing 'to all users' when installing, the terminal server system would use the roaming folder of the user to store the preferences but I was wrong...
I don't know what users are going to use the app and cannot install directly to their folder either.
Is this a terminal server settings thing or do I have to write some code in the app that checks if the user has the xml in its folder and copy it and use it if it doesn’t?
Do not store application preferences in its directory. Instead, store it in user's roaming directory - use Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) (since you tagged the post as managed). Then it can be installed once, but run multiple times by multiple users and each of them will get his set of settings.