{"id":27487,"date":"2017-04-09T10:51:44","date_gmt":"2017-04-09T08:51:44","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=27487"},"modified":"2017-04-09T10:53:21","modified_gmt":"2017-04-09T08:53:21","slug":"sshrc-bring-your-bashrc-vimrc-etc-with-you-when-you-ssh","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2017\/04\/09\/sshrc-bring-your-bashrc-vimrc-etc-with-you-when-you-ssh\/","title":{"rendered":"sshrc &#8211; bring your .bashrc, .vimrc, etc. with you when you ssh"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"https:\/\/github.com\/Russell91\/sshrc\">sshrc<\/a> looks like a handy tool, for those quick SSH sessions to machines, where you can&#8217;t setup your full environment for whatever reason (maybe a shared account or automated templating or restricted access). \u00a0Here&#8217;s a description from the project page:<\/p>\n<blockquote><p>sshrc works just like ssh, but it also sources the ~\/.sshrc on your local computer after logging in remotely.<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ echo &quot;echo welcome&quot; &gt;&gt; ~\/.sshrc\r\n$ sshrc me@myserver\r\nwelcome\r\n\r\n$ echo &quot;alias ..='cd ..'&quot; &gt;&gt; ~\/.sshrc\r\n$ sshrc me@myserver\r\n$ type ..\r\n.. is aliased to `cd ..'\r\n<\/pre>\n<p>You can use this to set environment variables, define functions, and run post-login commands. It&#8217;s that simple, and it won&#8217;t impact other users on the server &#8211; even if they use sshrc too. This makes sshrc very useful if you share a server with multiple users and can&#8217;t edit the server&#8217;s ~\/.bashrc without affecting them, or if you have several servers that you don&#8217;t want to configure independently.<\/p><\/blockquote>\n<p>I&#8217;ve discovered it by accident when searching through packages in the Fedora repositories. So, yes, you can install it with yum\/dnf.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>sshrc looks like a handy tool, for those quick SSH sessions to machines, where you can&#8217;t setup your full environment for whatever reason (maybe a shared account or automated templating or restricted access). \u00a0Here&#8217;s a description from the project page: sshrc works just like ssh, but it also sources the ~\/.sshrc on your local computer &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2017\/04\/09\/sshrc-bring-your-bashrc-vimrc-etc-with-you-when-you-ssh\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">sshrc &#8211; bring your .bashrc, .vimrc, etc. with you when you ssh<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"sshrc - bring your .bashrc, .vimrc, etc. with you when you ssh #SysAdmin #Linux #SSH #Fedora","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,133,62],"tags":[3098,1960,2351,3436,3094],"keyring_services":[],"class_list":["post-27487","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-sysadmin","category-technology","tag-bash","tag-command-line","tag-fedora-linux","tag-ssh","tag-vim"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":22559,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/09\/22\/sshrc-bring-your-bashrc-vimrc-etc-with-you-when-you-ssh\/","url_meta":{"origin":27487,"position":0},"title":"sshrc &#8211; bring your .bashrc, .vimrc, etc. with you when you ssh","author":"Leonid Mamchenkov","date":"September 22, 2014","format":"link","excerpt":"sshrc - bring your .bashrc, .vimrc, etc. with you when you ssh","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":29153,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/12\/28\/ssh-examples-tips-tunnels\/","url_meta":{"origin":27487,"position":1},"title":"SSH Examples, Tips &#038; Tunnels","author":"Leonid Mamchenkov","date":"December 28, 2018","format":false,"excerpt":"\"SSH Examples, Tips & Tunnels\" is a nice collection of tips and examples for Secure Shell (ssh) users. It covers a variety of scenarios from simple remote connections, to file copying, to tunnels and jump hosts.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26279,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/07\/24\/ssh-multiplexing-and-ansible-via-bastion-host\/","url_meta":{"origin":27487,"position":2},"title":"SSH multiplexing and Ansible via bastion host","author":"Leonid Mamchenkov","date":"July 24, 2016","format":false,"excerpt":"It never ceases to amaze me how even after years and years of working with some technologies I keep finding out about super useful features in those technologies, that could have saved me lots of time if I knew about them earlier. \u00a0Today was a day just like that. I\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28211,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/11\/13\/ssh-via-bastion-host\/","url_meta":{"origin":27487,"position":3},"title":"SSH via bastion host","author":"Leonid Mamchenkov","date":"November 13, 2017","format":false,"excerpt":"A while back I wrote this blog post on the subject of using SSH via bastion hosts.\u00a0 If you are into this sort of thing, have a look at this blog post by my brother.\u00a0 He is providing a few more explanations and clarifications, as well as covers a tricky\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28247,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/11\/27\/ssh-vs-openvpn-for-tunneling\/","url_meta":{"origin":27487,"position":4},"title":"SSH vs OpenVPN for Tunneling","author":"Leonid Mamchenkov","date":"November 27, 2017","format":false,"excerpt":"I have never particularly liked Virtual Private Networking (VPN).\u00a0 From the old days, when there were a gadzillion of proprietary implementations, each being super slow, resource hungry, and requiring a mess of versions specific requirements, like Java and Firefox.\u00a0 Secure Shell (SSH) has always been my choice for remote connections\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12267,"url":"https:\/\/mamchenkov.net\/wordpress\/2010\/03\/19\/copy-ssh-key-to-remote-machine\/","url_meta":{"origin":27487,"position":5},"title":"Copy SSH key to remote machine","author":"Leonid Mamchenkov","date":"March 19, 2010","format":false,"excerpt":"Those of us who use secure shell (SSH) for logging in to remote machines, already know about key authentication, which is so much easier and sometimes more secure than password authentication.\u00a0 We also know that in order to make it work you need to: generate a pair of keys with\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=27487"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27487\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=27487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=27487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=27487"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=27487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}