Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DD-WRT SSH PORT

Posted on 2010-11-27
9
Medium Priority
?
983 Views
Last Modified: 2012-05-10
I made mistake I change ssh default port from 22 to 443.
I need to know how to change it back via ssh.
0
Comment
Question by:toroblanco2002
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 79

Expert Comment

by:arnold
ID: 34226537
ssh user@ipaddress -p 443
nvram set sshd_wanport=22 sshd_port=22

or run nvram show | grep 443 after your login and update the variables with SSHD in them.
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34226656
It did not work I try both of the commands.
At least if i will know where the sshd_config file on my router is I will attempt to edit it. Thats really what I'm looking for.  I thought it on /etc/ssh/sshd_config but is not there. I was able to see it once but I did not pay attention on what directory.
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34226706
I now that I notice one of the commands I'm not sure which one did change the remote port to 22. But I want to change the default por not the remote port. will changing the wanport =22 to localport=22 will do it?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 79

Expert Comment

by:arnold
ID: 34226735
run/executed after you login into the dd-wrt router with ssh
nvram show | grep -i ssh

what is being returned? with 443?
update that with nvram set sshd_port=22

The settings are set within the nvram versus having a /etc/ssh/sshd_config as is usually where the sshd config is on a linux.

0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227267
Ok, after run nvram set sshd_port=22 what command should I run to save the changes?
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227341
I think this is going to work... I have one more question... do you know how can create a simple bash script to ping one of my computers every 10 min to check if is up and email me if the pc is down.
this is example of what if have some gave me this.

#!/bin/bash
ping -c 3 192.168.1.1
if [[ $? != 0 ]]; then
    date '+%m/%d - %H:%M : Connection Unavailable' >> /var/log/monitor.log
    mail -s "Server down, oh noes!" email@email.net < /var/log/monitor.log
else
    date '+%m/%d %H:%M : Connection Available' >> /var/log/monitor.log
fi

I'm new to all this I'm to learn so how can I put this script inside the router and make functional.

Thanks I will increase the points on this questions if is require to get this done, I will really appreciate your help.
0
 
LVL 79

Accepted Solution

by:
arnold earned 600 total points
ID: 34227553
Emailing components are not available within dd-wrt setup to make this possible.
you would need to add components to your install.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=16041

A good opensource monitoring network/data collection tool is nagios, openNMS, cacti.


nvram commit

saves/writes the changes that will survive a power cycle.
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227598
Thank you
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227607
Thank you I will check it out.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question