I am trying to learn the Amazon's AWS - EC2 service and was following its tutorial (at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html)
I have successfully launched an instance and am on Step:2, Connect to your instance. I got PuTTY and followed the tutorial for connection using PuTTY (at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html)
Here I am unable to use the command - pscp -i C:\path\my-key-pair.ppk C:\path\Sample_file.txt ec2-user#public_dns:/home/ec2-user/Sample_file.txt as it shows the following error : ' -bash: pscp: command not found '
My main aim is to use an online free temporary server to host a RESTful API that I have made and tested on localhost in python3.
I am a beginner in this field and would like some help.
Thank you.
pscp is Windows program.
You are not supposed to use it in PuTTY terminal (on the virtual machine shell), but on your local Windows machine.
Related
I launched an instance & downloaded my secret key. I've attempted this on 2 different devices and instances. Im trying to connect to the instance so I can upload files. Whenever I attempt to connect, this permission denied message displays.
Note I've downloaded and used openSSH
PS C:\WINDOWS\system32> ssh -i C:\Users*\Downloads*key.pem #ec2----.us-west-2.compute.amazonaws.com
The authenticity of host 'ec2----.us-west-2.compute.amazonaws.com (...)' can't be established.
ECDSA key fingerprint is SHA256:.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ec2----.us-west-2.compute.amazonaws.com,...' (ECDSA) to the list of known hosts.
*#ec2----**.us-west-2.compute.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
PS C:\WINDOWS\system32>
P.S. This is my first post, so constructive criticism on etiquette is welcome :)
Recently started my first job (an internship really) in the IT field. 3 months ago working for a start-up. Im hoping to migrate eventually to something in the field of cloud security, OSINT, DevSecOps, Web Development. Passionate about information security, open source software.
I followed this tutorial from amazon on how to connect to my instance
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/openssh.html
Looks like it's an issue with .pem file permissions. Check this video & see if you can resolve the error.
You can use puttygen to get ppk file which is helpful to SSH from windows.
If you want to use .pem files, mobaxterm is good software to use
You are very welcome to the community, it's nice to know you started your first Job!
To get you started on how to connect to the AWS Linux instance there is a nice KB article Connect to your Linux instance from Windows using Windows Subsystem for Linux and another one using putty look at here & another SO thread.
There are a few thing you need to learn as Prerequisites:
Verify that the instance is ready
Verify the general prerequisites for connecting to your instance
Install the Windows Subsystem for Linux (WSL) and a Linux distribution on your local computer
Copy the private key from Windows to WSL
Then use :
ssh -i /path/key-pair-name.pem instance-user-name#instance-public-dns-name
OR
ssh -i /path/key-pair-name.pem instance-user-name#instance-IPv6-address
From using your Windows CMD:
PS C:\WINDOWS\system32> ssh -i C:\Users\<user_name>\Downloads\testkey.pem ec2-user#ec2----.us-west-2.compute.amazonaws.com
OR
PS C:\WINDOWS\system32> ssh -i C:\Users\<user_name>\Downloads\testkey.pem ec2-user#<Some_IP_Address>
Better Use mobaexterm and copy user key in there and you will there:
Thank you all who use their time to help others. Thank you in advance.
I am taking a class on EDX for Linux command line. I have attached the instructions I have followed to set up Red hat using Windows 10. But the SSH for isn't working it says that RSA Key not found. (Attachment didn't work)
I paste it here
"The recommended way to access your Red Hat Enterprise Linux cloud instance for this course is
to use Secure Shell (ssh) to get an interactive shell on the system.
Step 1: Getting SSH
If you are using macOS or Linux: The OpenSSH command (ssh) should already be installed on
your computer. Start a terminal program to get a shell, and proceed to the next step.
If you are using Microsoft Windows, you will need to get an SSH client as follows:
● Option 1: Download Git for Windows from https://git-scm.com/download/win and install
it using the default settings. When it is installed, right-click on your desktop (not an icon
or a file) and select Git Bash Here to open a Git Bash command prompt. An SSH client is
provided with Git Bash and you can continue with Step 2.
● Option 2: If you have the PuTTY client, which can be downloaded from
http://www.chiark.greenend.org.uk/~sgtatham/putty/, and you are familiar with that
tool, you can use that to connect to your instance. AWS provides a tutorial on this at
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html.
Step 2: Connecting to your instance with SSH
From the Amazon EC2 console, in the left-side menu under INSTANCES, click Instances to
display a list of the instances you have running. This is probably just the one you set up for this
course. Select its checkbox and click Connect:"
Also, I have another PC I built running on Ubuntu. Can I use that PC with the RSA by logging into AWS account if there is no solution.
I have researched this question and I am stuck here trying to find a solution so I can start class.
I am just getting started with Drools and on a linux EC2 instance and trying to run the examples: runExamples.sh but it needs an X11 display. So how do I configure this to display from the instance to my windows laptop, or run the examples script in command line mode? Or is there another simpler example that I can run to get started?
You can use the X-server of another node in a network by
$ export DISPLAY=<hostname>:0.0
Replace <hostname> with the host name when it is known to the localhost (add this to /etc/hosts) ir the IP address.
I've tried executing a simple "ls" command on a remote server, using the command:
rsh -l limlim/myPassword myServerName "ls"
When running this command, I get the following error message:
rshd: luser too long
--> What am I doing wrong here?
My final goal is to use rsh to work on the server files, remotely, as I'm working on the files on my Eclipse, locally.
-->How can this be done?
Have you considered switching to the modern equivalent of rsh, ssh?
ssh is the standard tool for interacting securely with remote hosts, and you will find that there are more people with knowledge of ssh who are able to help you.
I'm trying to execute vmc tunnel but i get error 'ruby interpreter has stopped working' . Tryed to find what's the problem on the Internet but the only solution i saw was to upgrade ruby version to 1.9.3 , but I already have this version.
Thank you
This worked for me yesterday on Win7 using ruby 1.9.2p290. Ruby 1.9.3p194 failed with the same error you are getting.
Remember that the tunnel is a connection between the mysql client running on your local machine to the mysql service on cloudfoundry, so step 1 is making sure that your local mysql works, including your path so that vmc can easily find your client. Refer to the steps at http://docs.cloudfoundry.com/tools/vmc/caldecott.html for details
Can you please execute the following commands and paste the output here?
ruby -v
vmc -v