Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Perfect! All I had to do was move the code I had put into /root/.bash_profile into /root/.ssh/rc and it works great. Thanks! Commented Jul 13, 2012 at 20:40
  • @JoeTomato Add the xauth-stuff outlined in the man-page if you ever need that for root. Commented Jul 13, 2012 at 20:42
  • You can also use /etc/ssh/sshrc for the same purpose of the ~/.ssh/rc file, which would allow you to perform commands when ANYONE logs in via ssh (rsync,scp,sftp,ssh...) Commented Jul 14, 2012 at 17:36
  • @lomix propably not a good idea - since you will have to provide xauth - that file is meant to replace that mechanism. Commented Jul 14, 2012 at 21:04
  • I've looked into it but just wanted to confirm, the xauth stuff is only if you're doing x11 forwarding? I dont think I need to worry about it as these servers don't have a GUI installed... Or am I wrong about what it is? Commented Jul 14, 2012 at 22:18