I resolved this issue in my centos machine by using command:
ssh -i <Your.pem> ec2-user@<YourServerIP>
It was about userName which was ec2-user
in my case.
Referenced From: AMAZONTroubleshooting
Related Posts:
- Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server
- mysql_config not found when installing mysqldb python interface
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- Pseudo-terminal will not be allocated because stdin is not a terminal
- X11 forwarding request failed on channel 0
- mysql_config not found when installing mysqldb python interface
- Pseudo-terminal will not be allocated because stdin is not a terminal
- How to download a file from server using SSH?
- connect to host localhost port 22: Connection refused
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- How to configure WP filesystem access in Linux (Ubuntu Server)?
- Can I automatically add a new host to known_hosts?
- Can I nohup/screen an already-started process?
- Is it normal to get hundreds of break-in attempts per day?
- How to reconnect to a disconnected ssh session
- how to disable SSH login with password for some users?
- Keeping a linux process running after I logout
- How to check if an RSA public / private key pair match
- how do you create an ssh key for another user?
- “POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?
- Does getting disconnected from an SSH session kill your programs?
- Can you have more than one ~/.ssh/config file?
- How to add a security group to a running EC2 Instance?
- What Linux distribution is the Amazon Linux AMI based on?
- SSH from A through B to C, using private key on B [closed]
- Show all users and their groups/vice versa
- Why don’t EC2 ubuntu images have swap?
- Why is TCP accept() performance so bad under Xen?
- SSHFS mount that survives disconnect
- Temporarily ignore my `~/.ssh/known_hosts` file?
- How can I fully log all bash scripts actions?
- What’s wrong with always being root?
- Hundreds of failed ssh logins
- protocol version mismatch — is your shell clean?
- Chmod 777 to a folder and all contents [duplicate]
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to install grub after installing Windows 10
- -bash: syntax error near unexpected token `newline’ for display command
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Shell command to tar directory excluding certain files/folders
- QEMU: /bin/sh: can’t access tty; job control turned off
- Meaning of exit status 1 returned by linux command
- Extract file basename without path and extension in bash
- How to change permissions for a folder and its subfolders/files in one step
- linux command to get size of files and directories present in a particular folder?
- ./configure : /bin/sh^M : bad interpreter
- Compile the Fortran program in Windows using gfortran
- How can I set the ‘backend’ in matplotlib in Python?
- Yum fails with – There are no enabled repos.
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- Writing a simple shell in C using fork/execvp
- configure: error: cannot run C compiled programs
- What does set -e mean in a bash script?
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Difference between exec, execvp, execl, execv?
- Restarting cron after changing crontab file?
- cd into directory without having permission
- What does ‘bash -c’ do?
- How do I know the script file name in a Bash script?
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- Copying a large directory tree locally? cp or rsync?
- Check if port is open or closed on a Linux server?
- When does `cron.daily` run?
- How to run a command multiple times, using bash shell?
- Should I quit using Ifconfig?
- SSL Certificate Location on UNIX/Linux
- What is “-bash: !”: event not found”
- Force dig to resolve without using cache
- How do you make it obvious you are on a production system?
- How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?
- How to forcibly close a socket in TIME_WAIT?
- Mount CIFS Host is down
- Colors in bash after piping through less?
- List of files installed from apt package
- How to copy a large number of files quickly between two servers
- Why does sudo command take long to execute?
- Allow SFTP but disallow SSH?
- How to display certain lines from a text file in Linux?
- How can I export the privileges from MySQL and then import to a new server?
- Is there a directory equivalent of /dev/null in Linux?
- How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
- Can I send some text to the STDIN of an active process running in a screen session?
- How can I get processor/RAM/disk specs from the Linux command Line? [duplicate]
- GPG does not have enough entropy
- Is there a way to see the execution tree of systemd?
- How to determine the hostname from an IP address in a Windows network?
- How to get TX/RX bytes without ifconfig?
- create home directories after create users
- Curl: disable certificate verification
- How do I redirect subdomains to a different port on the same server?
- Running Cron every 2 hours [duplicate]
- How to apply a filter to real time output of `tail -f `?
- How to check the physical status of an ethernet port in Linux?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- Practical maximum open file descriptors (ulimit -n) for a high volume system
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?
- How to handle relative urls correctly with a reverse proxy
- Where’s the conventional place to store git repositories in a linux file system tree?