Jump to content

ssh question


liquidzoo
 Share

Recommended Posts

I have a couple of questions about ssh.

 

I have it set up right now, and so far really like it. It's pretty easy to use. I know that by default on my server it displays the /etc/motd file on connect. Is it possible to edit this file so that it executes a command instead of just displaying a message? I want it to, say, run the fortune command when I connect. Is this possible?

 

My next question is this: Is it possible to have an alias set for the ip of my desktop machine? So, instead of ssh ip I can issue a command like ssh desktop? If so, where would I do this?

Link to comment
Share on other sites

first question: i believe so, though i'm not sure how. it probably has to do with bash-scripting....go hunt down paul ;-)

 

second question: easy, just set the ip to whatever you want it to be identified as in /etc/hosts just the way your own system is setup in there.

Link to comment
Share on other sites

I am what you would call a green scripter, but this is taken from the .login file located in ~ on my bsd box.

 

[ -x /usr/games/fortune ] && /usr/games/fortune freebsd-tips

 

You could see where to put that on MD.. likely .bashrc or something.

 

also, my shell is csh on that box, so don't know if it needs csh or if it will work with bash which is MD's default shell.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...