15
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macでのssh/sshdあれこれ。

Posted at

概要

最近自室にMac環境が加わったので、OS Xでssh/sshdを運用するうえでのあれこれをまとめました。

※検証環境は OS X Yosemite です。

※まだ運用し始めたばかりなので、何か気付き次第またここに追加で綴っていく予定です。

あれこれ

sshd_configの場所

/etc/sshd_config


## .bashrc と .bash_profile SSHログインした際に自動的に処理を走らせたい場合に書くやーつですね。

ユーザーのホームに .bash_profile を作成すればOKみたい。

$ vim ~/.bash_profile

`.bashrc` も走らせたい場合は、 `.bash_profile` に、
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

を記述すればOKとのこと。(便利!)

参考


## sshdを再起動 ``` $ sudo launchctl stop com.openssh.sshd ```

参考


## 日本語が文字化けする或いは入力できない

.bash_profileexport LANG=ja_JP.UTF-8; を追記で解決!

.bash_profile
export LANG=ja_JP.UTF-8;

参考


# その他 - [MacにSSH接続を試みると"Connection refused"。](http://qiita.com/sango/items/6075cc6ba97b40e51619)
15
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?