The purpose here is to fire up a EC2 compute server, run a program and save the output from that program on our local compute cluster at the university.
Basically, you just need to a line to /etc/fstab and save the instance as an image (that's what I did).
What you need:
- An Amazon EC2 instance with sshfs installed.
- A user with SSH keys properly setup to the remote system (the SSH keys cannot require a passphrase).
sshfs#ubuntu@remoteserver:/home/ubuntu/remote_folder/ /home/ubuntu/local_folder/ fuse user,delay_connect,_netdev,reconnect,uid=1000,gid=1000,IdentityFile=/home/ubuntu/.ssh/id_rsa,idmap=user,allow_other,workaround=rename 0 0
Everything is one long line that goes into /etc/fstab. The IdentityFile points to your SSH key. You need the "_netdev" keywords to mount the SSHFS folder after network becomes available. The "reconnect" keyword does what it reads, so throw that in as well.
I read a few posts from other people who had difficulties mounting SSHFS properly without the "delay_connect" and "workaround=rename" keywords, so I added those for good measure.
Note that you need the trailing / after the folder names! I won't work without (and I'm talking from bitter experience here).
Furthermore, you want to add the following line to /etc/ssh/ssh_config
ServerAliveInterval 5
This makes SSH send a keep alive signal every 5 seconds so you don't get disconnected due to being idle.
Apart from that I think the above should be self-explanatory (for someone looking for this information).
Thanks for this great post! - This provides good insight. You might also be interested to know more about generating more leads and getting the right intelligence to engage prospects.
ReplyDeleteTechno Data Group implements new lead gen ideas and strategies for generating more leads and targeting the right leads and accounts.
Amazon AWS Users Email & Mailing List
The post you wrote which is full of informative content. I Like it very much. Keep on posting!!
ReplyDeletePHP Training in Chennai
PHP Course in Chennai
Python Training in Chennai
Java Training in Chennai
Software Testing Training in Chennai
PHP Training in Annanagar
PHP Training in Tambaram
Really nice post.provided a helpful information.I hope that you will post more updates like this. AWS Certification Training
ReplyDeleteThe posttranslational modification of eukaryotic proteins by the addition of isoprenyl lipids at their C-termimi was first observed in the 1970s and 1980s. Since then, more than a hundred proteins have been shown to be modified by C15 farnesyl or C20 geranylgeranyl groups, Peptide C-Terminal Modification
ReplyDeleteWe are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work. Eran Eyal
ReplyDelete