SSH login without password using SSH public/private keys

SSH or Secure SHELL is the most popular and trusted UNIX-based cryptographic network protocol. It can be used for secure data communication, remote server logins, remote command execution, and many other secure network services between two networked servers. Normally, password authentication is used to connect to a remote server via SSH. In this blog tutorial…

git command line commit

Git has a “staging area” where files need to be added before being committed, you can read an explanation of it here. So if you make some change and commit directly, you get some message like: no changes added to commit (use “git add” and/or “git commit -a”) preview Before you add, you could have…

ssh to the ec2 instance(beanstalk)

Configure Security Group In the AWS console, open the EC2 tab. Select the relevant region and click on Security Group. You should have an elasticbeanstalk-default security group if you have launched an Elastic Beanstalk instance in that region. Edit the security group to add a rule for SSH access. The below will lock it down…

putty ssh vi ctrl s

Every once in awhile, I’ll press CTRL+S by accident while I’m inside a terminal window. For the longest time, this simple accidental keystroke meant I had reconnect to my Linux server, kill whatever program I was running, and then start it again. Eventually I got sick of this happening and decided to do what I…

copy file through ssh

I use winscp or secure shell client.   sftp is (and works) similar to ftp scp is a neat little program: copy from a remote machine to my machine: scp user@192.168.1.100:/home/remote_user/Desktop/file.txt /home/me/Desktop/file.txt copy from my machine to a remote machine: scp /home/me/Desktop/file.txt user@192.168.1.100:/home/remote_user/Desktop/file.txt copy all file*.txt from a remote machine to my machine (file01.txt, file02.txt,…

VPS上使用ssh mysql命令

连接ssh, 在terminal中:ssh -l root ip , 敲入密码,搞定。 navigate到usr/bin下面(有mysql执行文件的地方),开始mysql 一、mysql服务的启动和停止 net stop mysql net start mysql 二、登陆mysql 语法如下: mysql -u用户名 -p用户密码 键入命令mysql -uroot -p, 回车后提示你输入密码,输入12345,然后回车即可进入到mysql中了,mysql的提示符是: mysql> 注意,如果是连接到另外的机器上,则需要加入一个参数-h机器IP 三、增加新用户 格式:grant 权限 on 数据库.* to 用户名@登录主机 identified by “密码” 如,增加一个用户user1密码为password1,让其可以在本机上登录, 并对所有数据库有查询、插入、修改、删除的权限。首先用以root用户连入mysql,然后键入以下命令: grant select,insert,update,delete on *.* to user1@localhost Identified by “password1”; 如果希望该用户能够在任何机器上登陆mysql,则将localhost改为”%”。 如果你不想user1有密码,可以再打一个命令将密码去掉。 grant select,insert,update,delete on mydb.* to user1@localhost…