ssh motd

jdavidb on 2006-11-15T16:07:19

Anyone know what's the intelligent way to connect to a machine with ssh and not see the MOTD? I'm currently redirecting stderr to /dev/null, but obviously that means I miss some errors. The -q option doesn't do it. I can't see anything in the ssh manpage to help. I don't have access to the server config files in question to tell them not to print the MOTD. I can't find a way to pass my ssh client an option to pass to the server to tell it not to do that, but I'm hoping it exists.


Is hushlogin what you want?

brian_d_foy on 2006-11-15T16:52:50


ssh won't know anything about the source of the characters, it just transports them. I think you want to create a .hushlogin file to tell the shell not to show you that.

Re:Is hushlogin what you want?

jdavidb on 2006-11-15T18:06:54

Unfortunately I don't have shell access. I'm accessing with SFTP. I guess maybe I can ask the vendor of the box to create the file, though. Thanks!

Re:Is hushlogin what you want?

brian_d_foy on 2006-11-15T18:21:26

You can't transfer a file over SFTP?

Re:Is hushlogin what you want?

jdavidb on 2006-11-16T14:41:11

I can (although I thought I wouldn't have write access). I tried it; it doesn't work. My original response was addressing the fact that the shell was showing me the motd. It's not the shell showing it; it's the sshd. I'm not accessing a shell at any point, to my knowledge. So I guess that's why .hushlogin doesn't work. But thanks for trying to help. At least I learned something. :)

.hushlogin

mattriffle on 2006-11-15T16:52:55

Try creating a .hushlogin file in the home directory of the account you're connecting to.

-Matt