I am a fresher who joined a organisation recently, I got access to VM they gave just ip address, username & password of VM is it enough to login to terminal emulators like putty or git bash? If yes please do brief about the procedure.. Thanks in advance!
Yes, it's enought. In git bash you can do ssh user#server_ip to get in, and then you will have to put the password.
Example: ssh sachin#192.168.1.53
Related
I have a Raspberry Pi set up as a download server at home. To access it from any Windows PC I download Putty and add its parent folder to the Path environment variable.
When accessing it via SSH using Putty GUI or CLI from any PC on my home network, it attempts to login with an SSH key, if it fails it prompts me for a password, and I can login.
I set up an ngrok account to be able to access the server from work (ngrok uses the same address for all users, but each free user gets a specific port, randomized on server reboot).
If i open up Putty's GUI and add the address (0.tcp.ngrok.io) and my port (13495) and click Open, I login normally, SSH key first, if that fails, password prompt, and I can login; as shown in the following picture: Putty GUI Login
However, if I login by command using "putty root#0.tcp.ngrok.io:13495" from the command line or making a Windows shortcut with that command as the target, it reacts as if password authentication is disabled and the only authentication method is via SSH key, which is not the case. (Failed Putty Logins)
I finally attempted to add the SSH key of my work desktop to the authorized_keys file, nothing changed. I can login by GUI using the key, but CLI login still fails.
I have tried resetting all of Putty's settings, redownloading, using Pageant instead of the Putty settings SSH>Auth, nothing works.
I have searched far and wide and delved into the creepy depths of the Internet and cannot find ANYONE with the same problem. If someone does find a post with the same question, well then that post must be running away from me.
Help me, please.
This is starting to get quite irritating.
Thanks in advance.
It's because PuTTY actually ignores everything after the colon (for a consistency with PuTTY psftp and pscp tools, where you specify a path after the colon).
So the putty root#0.tcp.ngrok.io:13495 works like putty root#0.tcp.ngrok.io. That means you actually connect to the default SSH 22 port, not to the 13495.
You have to use the -P switch to specify the non-default port:
putty root#0.tcp.ngrok.io -P 13495
I have successfully connected using ssh and inputted the right credentials. Where can I find the backup sql file? Thanks in advance
Connected to the remote server, take the dump of the database using following command
mysqldump -R -h root -u username -ppassword databasename > /home/krishna/databasename.sql;
Then you can able to find your database in the /home/krishna/ folder.
Run pwd on the remote machine to see where mysqldump file resides. You can transfer it to your personal computer using scp as,
scp $PWD/dumpfile localuser#localhostip:/home/localuser
This command will prompt for local pc password, enter it. And the file will be copied to your home folder on local machine.
I can see you have logged in report server through SSH so you will get your MySQLdump file in your SSH user home directory. If you want to download that file on your local pc. Login through FTP with same SSH user details and download it
Thanks you for the answers! I consolidated all of it and came up with my own. I used mysqldump with the command line that you guys suggested and made a back up. Then I used ftp to gain access to the server's folders. That's where I downloaded the file. Again Thank you all so much
I installed the eucalyptus faststart3.4.2 iso from here http://downloads.eucalyptus.com/software/faststart/ and then I installed cloud in a box. Then creating an instance m1.small I am trying to ssh into the instance created by its IP. The VM is running and I can ping it, when ssh -i euca-demo.private 10.5.20.224 is run most probably it enters VM but asks for passphrase which I dont know because the image was given after installation that I used to create the instance. The message is
Enter passphrase for key 'euca-demo.private':
How can I enter without knowing the passphase? How to know the passphase?
Can you try to login as ec2-user?
$ ssh -i euca-demo.private ec2-user#10.5.20.224
As you have said in your comment, it seems that the public key of euca-demo.private is associated with the cloud-user user in the VM. So you can SSH via this user only.
I need to copy a file from a remote machine to my local machine and I need to automate it.
I've tried SCP command and it's working, however, I could not automate the part wherein it is asking for the password of the user of the local machine and the remote machine.
Based on this article I can Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id
after following all the instructions written there, I tried to access the remote machine using this
ssh lalala#XXX.XXX.XXX.XXX
it works, it doesnt ask for the password anymore. But when I tried copying a file from that machine using the command below,
scp lalala#XXX.XXX.XXX.XXX:'/a/b/c.txt' lelele#XXX.XXX.XXX.YYY:'/b/c/'
it still asks for the password of the localmachine which is the lelele#XXX.XXX.XXX.YYY
I wonder if I did something wrong? what could it be? is there something wrong with the format of the command?
BTW, im using Centos, and I'm planning to code it using python
If you are copying to your local machine why don't you just do
scp lalala#XXX.XXX.XXX.XXX:'/a/b/c.txt' /b/c/
?
I tried your line on some machine with similar setup and didn't get asked for password; I got an error instead, but this is probably due to differences in our configurations. I tried mine and it worked.
Regarding whether your connection succeeds in the remote machine you could tail this file there:
tail -f /var/log/secure
If you see no error there you can be sure (well, never say always) your layout with the generated keys is working.
In this case I bet you'll see no error there
I think you may have multiple ssh keys and set identies only as yes. If so, please check this answer: https://askubuntu.com/a/999306/398861
I've followed a couple of tutorials for creating an Amazon EC2 instance using the command line tools
http://www.zabada.com/tutorials/deploying-a-rails-application-to-production-on-amazon-ec2.php
http://www.smartfrog.org/wiki/display/sf/Starting+an+EC2+Image+by+Hand
and all is well, i
ec2-add-keypair (directing the output of ec2-add-keypair directly to a file in ~/.ssh)
chmod 600 the keypair
ec2-run-instance
ec2-describe-instances
then, when the new instance is running try to ssh on
ssh -i ~/.ssh/ec2-keypair ec2-user#foo.bar.amazon.com
At this point i'm ALWAYS prompted for a password. Obviously there's no password so it always refuses me access.
My question is, what am i doing wrong here? Why am i being prompted for a password and how can i put this right so i can ssh onto the machine i've just started?
I'm guessing this is something to do with my local setup, but as far as i know this machine hasn't had anything custom done with .ssh (there's certainly no config file or anything like that lying around that might be screwing with things).
Anyone have any ideas or suggestions?
ec2-user# ? Why not root# ?