複数のSSHDを起動する2010-04-01 23:11:03

内向き、外向き用のsshdを用意する。

まず、シンボリックリンクを作成する

# cd /usr/sbin/
# ln -s sshd sshd-public

起動スクリプトをコピーし、外向き用にスクリプトを書き換える。

# cp /etc/rc.d/init.d/sshd /etc/rc.d/init.d/sshd-public

書き換え場所は次の通り。

# diff -u /etc/init.d/sshd /etc/init.d/sshd-public
--- /etc/init.d/sshd    2010-03-01 07:33:21.000000000 +0900
+++ /etc/init.d/sshd-public     2010-03-31 16:58:14.000000000 +0900
@@ -5,29 +5,29 @@
 # chkconfig: 2345 55 25
 # description: OpenSSH server daemon
 #
-# processname: sshd
+# processname: sshd-public
 # config: /etc/ssh/ssh_host_key
 # config: /etc/ssh/ssh_host_key.pub
 # config: /etc/ssh/ssh_random_seed
-# config: /etc/ssh/sshd_config
-# pidfile: /var/run/sshd.pid
+# config: /etc/ssh/sshd-public_config
+# pidfile: /var/run/sshd-public.pid

 # source function library
 . /etc/rc.d/init.d/functions

 # pull in sysconfig settings
-[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
+[ -f /etc/sysconfig/sshd-public ] && . /etc/sysconfig/sshd-public

 RETVAL=0
-prog="sshd"
+prog="sshd-public"

 # Some functions to make the below more readable
 KEYGEN=/usr/bin/ssh-keygen
-SSHD=/usr/sbin/sshd
+SSHD=/usr/sbin/sshd-public
 RSA1_KEY=/etc/ssh/ssh_host_key
 RSA_KEY=/etc/ssh/ssh_host_rsa_key
 DSA_KEY=/etc/ssh/ssh_host_dsa_key
-PID_FILE=/var/run/sshd.pid
+PID_FILE=/var/run/sshd-public.pid

 runlevel=$(set -- $(runlevel); eval "echo \$$#" )

@@ -108,9 +108,9 @@
        cp -af /etc/localtime /var/empty/sshd/etc

        echo -n $"Starting $prog: "
-       $SSHD $OPTIONS && success || failure
+       $SSHD -f /etc/ssh/sshd-public_config && success || failure
        RETVAL=$?
-       [ "$RETVAL" = 0 ] && touch /var/lock/subsys/sshd
+       [ "$RETVAL" = 0 ] && touch /var/lock/subsys/$prog
        echo
 }

@@ -128,7 +128,7 @@
        if [ "x$runlevel" = x0 -o "x$runlevel" = x6 ] ; then
            killall $prog 2>/dev/null
        fi
-       [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/sshd
+       [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/$prog
        echo
 }

@@ -159,7 +159,7 @@
                reload
                ;;
        condrestart)
-               if [ -f /var/lock/subsys/sshd ] ; then
+               if [ -f /var/lock/subsys/$prog ] ; then
                        do_restart_sanity_check
                        if [ "$RETVAL" = 0 ] ; then
                                stop

設定ファイルをコピーして、外向き用に書き換える。

# cp /etc/ssh/sshd_config /etc/ssh/sshd-public_config

# diff -u /etc/ssh/sshd_config /etc/ssh/sshd-public_config
--- /etc/ssh/sshd_config        2010-03-31 16:48:10.000000000 +0900
+++ /etc/ssh/sshd-public_config 2010-03-31 16:48:22.000000000 +0900
@@ -1,7 +1,7 @@
-Port 2222
+Port 22
 Protocol 2
 ListenAddress 192.168.0.4
-PidFile /var/run/sshd.pid
+PidFile /var/run/sshd-public.pid
 SyslogFacility AUTHPRIV
 LogLevel INFO
 PermitRootLogin no

これまた、diffで。

コメント

_ Arch Support Insoles ― 2015-08-22 03:28:43

I believe this is one of the such a lot important info for me. And i am happy reading your article. However wanna statement on few normal issues, The site taste is wonderful, the articles is really excellent : D. Just right task, cheers

_ quest bars ― 2015-08-30 19:49:53

Paragraph writing is also a fun, if you be familiar with after that you can write if not it is complex to write.

_ quest bars ― 2015-08-31 02:07:09

What's up, I read your blogs daily. Your story-telling style is awesome, keep it up!

_ quest bars ― 2015-08-31 11:50:49

You really make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it!

_ quest bars ― 2015-08-31 18:29:33

Good post however , I was wondering if you could write a litte more on this topic? I'd be very grateful if you could elaborate a little bit further. Appreciate it!

_ quest bars ― 2015-09-01 07:24:04

Right here is the right web site for everyone who really wants to understand this topic. You understand a whole lot its almost hard to argue with you (not that I personally would want to�HaHa). You certainly put a brand new spin on a subject which has been discussed for ages. Great stuff, just excellent!

_ limewire free music downloads ― 2015-09-12 11:39:07

Hi, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam feedback? If so how do you reduce it, any plugin or anything you can advise? I get so much lately it's driving me crazy so any help is very much appreciated.

_ plenty of fish dating site of free dating ― 2015-09-25 17:00:43

I think this is one of the most significant info for me. And i'm glad reading your article. But wanna remark on few general things, The site style is great, the articles is really great : D. Good job, cheers

_ Match.com Free Trial ― 2015-09-29 15:10:22

magnificent publish, very informative. I ponder why the opposite specialists of this sector do not notice this. You must continue your writing. I am sure, you've a huge readers' base already!

_ Plenty Of Fish Dating Site Of Free Dating ― 2015-10-08 00:20:42

Your method of telling the whole thing in this piece of writing is in fact good, all be able to effortlessly know it, Thanks a lot.

_ quest bars cheap ― 2015-10-13 13:53:58

Yesterday, while I was at work, my sister stole my iPad and tested to see if it can survive a twenty five foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and she has 83 views. I know this is completely off topic but I had to share it with someone!

_ pof.com sign in ― 2015-10-15 16:47:31

I always used to study paragraph in news papers but now as I am a user of web so from now I am using net for posts, thanks to web.

_ Plentyoffish Forums ― 2015-10-18 01:16:13

I am regular reader, how are you everybody? This post posted at this web site is actually fastidious.

_ how healthy are quest bars ― 2015-10-19 16:04:16

Very quickly this web site will be famous among all blog visitors, due to it's pleasant articles

_ plenty of fish dating site of free dating ― 2015-11-06 12:58:38

Thanks on your marvelous posting! I genuinely
enjoyed reading it, you are a great author.I will ensure that I bookmark your
blog and will eventually come back in the foreseeable future.
I want to encourage you to continue your great work, have a nice afternoon!

_ Plenty Of fish Dating Site of free dating ― 2015-11-06 15:48:39

I every time used to study post in news papers but now
as I am a user of web therefore from now I am using net for
articles, thanks to web.

_ plenty of fish dating site of free dating ― 2015-11-07 11:51:15

Oh my goodness! Awesome article dude! Thank you, However I am experiencing troubles with
your RSS. I don't understand the reason why I can't subscribe to
it. Is there anybody getting the same RSS problems?
Anybody who knows the solution will you kindly respond?
Thanks!!

_ justin bieber dating ― 2015-11-08 22:08:43

Wow, superb blog layout! How long have you been blogging for?

you made blogging look easy. The overall look of your web site is great,
let alone the content!

_ kroger plus card digital coupons ― 2015-11-17 12:04:46

I was able to find good info from your content.

_ www.krogerfeedback.com ― 2015-12-06 05:57:47

Every weekend i used to go to see this web site, because i wish for enjoyment,
for the reason that this this site conations genuinely pleasant funny material too.

_ www.krogerfeedback.com ― 2015-12-10 04:38:19

Great blog you have got here.. It's difficult to find excellent writing like yours nowadays.

I seriously appreciate individuals like you! Take care!!

_ krogerfeedback.com ― 2015-12-21 19:05:49

Hey there! I know this is kinda off topic but I was wondering if you knew
where I could locate a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm having problems
finding one? Thanks a lot!

_ quest bars ― 2016-02-09 01:31:52

I like the helpful info you provide in your articles. I will bookmark your weblog and check again here frequently.
I'm quite sure I'll learn plenty of new stuff right here!

Good luck for the next!

_ Quest Bars ― 2016-02-09 15:27:16

hello there and thank you for your information – I have certainly picked up
something new from right here. I did however expertise a few technical points using this website, since
I experienced to reload the site a lot of times previous to I could get it to load properly.
I had been wondering if your web hosting is OK? Not that I am complaining, but
slow loading instances times will sometimes affect your placement in google and
can damage your high-quality score if ads and marketing with Adwords.
Anyway I'm adding this RSS to my email and could look out for much
more of your respective exciting content. Ensure that you update this
again very soon.

_ quest bars ― 2016-02-19 16:42:02

Everything is very open with a really clear description of the issues.
It was really informative. Your website is useful.
Many thanks for sharing!

_ minecraft.exe ― 2016-02-21 23:09:39

Usually I don't read post on blogs, however I would like to say
that this write-up very forced me to take a look at and do
it! Your writing style has been surprised me. Thanks, quite nice article.

_ bernie sanders ― 2016-04-01 16:55:08

I have learn a few good stuff here. Certainly value bookmarking
for revisiting. I wonder how much attempt you put to create one
of these excellent informative web site.

_ krogerfeedback ― 2016-06-05 22:44:22

I got this web page from my friend who shared with me about this website and now this
time I am browsing this website and reading very informative content here.

_ quest bars cheap ― 2016-06-13 09:28:40

I think what you posted was actually very reasonable. But, what about this?
suppose you were to create a killer post title? I ain't saying your
content is not good, however what if you added a headline to maybe grab folk's attention? I mean 複数のSSHDを起動する:
日々精進 is kinda boring. You could peek at Yahoo's
front page and see how they create post headlines to grab viewers interested.
You might add a video or a picture or two to grab readers interested about what you've got to
say. In my opinion, it might make your blog a little livelier.

_ Mincraft ― 2016-07-03 03:24:58

Hurrah! In the end I got a website from where I be able to in fact get valuable
data regarding my study and knowledge.

_ Mincraft ― 2016-07-03 05:34:56

Your means of explaining everything in this post is in fact pleasant,
every one be capable of easily know it, Thanks
a lot.

_ fix connections to bluetooth audio devices and wireless displays in windows 10 ― 2016-08-19 06:53:32

Having read this I believed it was extremely enlightening.
I appreciate you spending some time and energy to put this article together.
I once again find myself spending a significant amount of time both reading and commenting.
But so what, it was still worth it!

_ quest bars ― 2016-09-09 06:23:37

Excellent post. I was checking continuously this blog and I am impressed!
Very helpful info particularly the last part :) I care for such information a lot.
I was looking for this particular info for a long time.
Thank you and best of luck.

_ Windows 10 Free Upgrade ― 2016-09-14 19:48:01

Great post. I was checking constantly this blog
and I'm impressed! Extremely useful information specifically the
last part :) I care for such info much. I was looking for
this certain info for a long time. Thank you and best of luck.

_ quest bars ― 2016-09-25 20:16:21

This paragraph offers clear idea for the new viewers of blogging,
that truly how to do blogging and site-building.

_ quest bars ― 2016-09-26 00:17:11

I always spent my half an hour to read this website's articles every day along with a
mug of coffee.

_ unblocked minecraft sweet and awesome ― 2016-09-30 10:26:49

Somebody essentially help to make critically articles I might state.
That is the very first time I frequented your website page and
thus far? I surprised with the analysis you made to make this actual put up extraordinary.

Wonderful job!

_ plenty of fish dating site of free dating ― 2016-10-05 15:50:46

Amazing! Its really amazing article, I have got much clear idea about from this post.

_ quest bars ― 2016-10-05 17:10:08

I like what you guys are usually up too. This kind of clever work and coverage!
Keep up the fantastic works guys I've incorporated you guys to our blogroll.

_ minecraft ― 2016-10-11 13:09:42

It's actually a nice and useful piece of information. I am satisfied that you shared
this helpful info with us. Please stay us up to date like this.
Thank you for sharing.

_ descargar minecraft team extreme ― 2016-10-11 18:09:28

I was able to find good advice from your blog articles.

_ minecraft ― 2016-10-14 06:00:40

Write more, thats all I have to say. Literally, it seems as though you relied on the video to
make your point. You obviously know what youre
talking about, why throw away your intelligence on just posting videos to your site when you could be giving us something
enlightening to read?

_ juegos de minecraft ― 2016-10-14 23:42:41

Hey! I know this is kinda off topic nevertheless I'd figured I'd
ask. Would you be interested in trading links or maybe guest authoring
a blog post or vice-versa? My website goes over a lot of the
same subjects as yours and I think we could greatly
benefit from each other. If you might be interested feel free to send me an email.
I look forward to hearing from you! Excellent blog by the way!

_ gamefly 3 month free trial ― 2016-11-15 12:45:00

It's an amazing piece of writing for all the online viewers; they will obtain benefit from it
I am sure. Gamefly 3 month free trial

_ quest bars gas ― 2016-11-20 04:46:26

Hi i am kavin, its my first occasion to commenting
anywhere, when i read this piece of writing i thought i could also create
comment due to this good post.

_ tinyurl.com ― 2016-12-02 00:47:27

I’m not that much of a online reader to be honest but your
blogs really nice, keep it up! I'll go ahead and bookmark
your website to come back in the future. Many thanks

_ free dating sites no fees ― 2016-12-10 11:30:03

My developer is trying to persuade me to move to .net from PHP.
I have always disliked the idea because of the
costs. But he's tryiong none the less. I've been using
WordPress on a number of websites for about a year and
am concerned about switching to another platform. I
have heard fantastic things about blogengine.net.
Is there a way I can transfer all my wordpress posts into it?

Any help would be really appreciated!

_ Gamefly Free Trial ― 2016-12-18 06:13:04

What's up, this weekend is nice in support of me, since this moment i am reading this fantastic informative
post here at my house.

_ Gamefly ― 2016-12-19 03:44:36

excellent issues altogether, you just won a emblem new reader.

What might you recommend about your post that you simply made
a few days in the past? Any certain?

_ Gamefly ― 2016-12-20 02:45:23

Pretty section of content. I just stumbled upon your weblog and
in accession capital to assert that I acquire actually enjoyed account your
blog posts. Anyway I'll be subscribing to your
augment and even I achievement you access consistently rapidly.

※コメントの受付件数を超えているため、この記事にコメントすることができません。

トラックバック

このエントリのトラックバックURL: http://mhrz.asablo.jp/blog/2010/04/01/4989172/tb