Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    196

    How to change ssh-port when transferring accounts

    My server were secured few days ago and the ssh port were changed to something else than 22. Now if I try to use WHM function to copy accounts from other servers, it wont work because WHM tries to connect to port 22.

    How can I change this port to something else?

  2. #2
    Join Date
    Dec 2002
    Location
    Texas
    Posts
    424
    ssh -l admin -p <port>

  3. #3
    Join Date
    Mar 2005
    Posts
    196
    Quote Originally Posted by 3rdcoast
    ssh -l admin -p <port>
    That just gave:

    Options:
    -l user Log in using this user name.
    -n Redirect input from /dev/null.
    -F config Config file (default: ~/.ssh/config).
    -A Enable authentication agent forwarding.
    -a Disable authentication agent forwarding (default).
    -X Enable X11 connection forwarding.
    -x Disable X11 connection forwarding (default).
    -i file Identity for public key authentication (default: ~/.ssh/identity)
    -t Tty; allocate a tty even if command is given.
    -T Do not allocate a tty.
    -v Verbose; display verbose debugging messages.
    Multiple -v increases verbosity.
    -V Display version number only.
    -q Quiet; don't display any warning messages.
    -f Fork into background after authentication.
    -e char Set escape character; ``none'' = disable (default: ~).
    -c cipher Select encryption algorithm
    -m macs Specify MAC algorithms for protocol version 2.
    -p port Connect to this port. Server must be on the same port.
    -L listen-port:host:port Forward local port to remote address
    -R listen-port:host:port Forward remote port to local address
    These cause ssh to listen for connections on a port, and
    forward them to the other side by connecting to host:port.
    -D port Enable dynamic application-level port forwarding.
    -C Enable compression.
    -N Do not execute a shell or command.
    -g Allow remote hosts to connect to forwarded ports.
    -1 Force protocol version 1.
    -2 Force protocol version 2.
    -4 Use IPv4 only.
    -6 Use IPv6 only.
    -o 'option' Process the option as if it was read from a configuration file.
    -s Invoke command (mandatory) as SSH2 subsystem.
    -b addr Local IP address.

  4. #4
    Join Date
    Dec 2002
    Location
    Texas
    Posts
    424
    ssh ip -l <user> -p <port>

    i'm a little lysdexic

  5. #5

    ssh port

    Quote Originally Posted by petfut
    My server were secured few days ago and the ssh port were changed to something else than 22. Now if I try to use WHM function to copy accounts from other servers, it wont work because WHM tries to connect to port 22.

    How can I change this port to something else?
    hello
    i want to change ssh default port ( 22 ) to another port like 909 for more security. i have edit ssh_config and ssh_config and set the new port on these files and restart server after edit. but ssh port is 22 yet. whats the problem?
    regards

  6. #6
    Join Date
    May 2003
    Location
    The Netherlands
    Posts
    298
    Try sshd_config
    SuperRacks Ltd European Hosting
    We serve you with custom services
    Visit our website or ask for a custom quote
    Quality linux and Windows hosting, servers and collocation

  7. #7

    *

    Quote Originally Posted by Host3000
    Try sshd_config
    [email protected] [/etc/ssh]# cat sshd_config
    # $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $

    # This is the sshd server system-wide configuration file. See
    # sshd_config(5) for more information.

    # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

    # The strategy used for options in the default sshd_config shipped with
    # OpenSSH is to specify options with their default value where
    # possible, but leave them commented. Uncommented options change a
    # default value.

    #Port 909
    #Protocol 2,1
    #ListenAddress 0.0.0.0
    #ListenAddress ::

    # HostKey for protocol version 1
    #HostKey /etc/ssh/ssh_host_key
    # HostKeys for protocol version 2
    #HostKey /etc/ssh/ssh_host_rsa_key
    #HostKey /etc/ssh/ssh_host_dsa_key

    # Lifetime and size of ephemeral version 1 server key
    #KeyRegenerationInterval 3600
    #ServerKeyBits 768

    # Logging
    #obsoletes QuietMode and FascistLogging
    #SyslogFacility AUTH
    SyslogFacility AUTHPRIV
    #LogLevel INFO

    # Authentication:

    #LoginGraceTime 120
    #PermitRootLogin yes
    #StrictModes yes

    #RSAAuthentication yes
    #PubkeyAuthentication yes
    #AuthorizedKeysFile .ssh/authorized_keys

    # rhosts authentication should not be used
    #RhostsAuthentication no
    # Don't read the user's ~/.rhosts and ~/.shosts files
    #IgnoreRhosts yes
    # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
    #RhostsRSAAuthentication no
    # similar for protocol version 2
    #HostbasedAuthentication no
    # Change to yes if you don't trust ~/.ssh/known_hosts for
    # RhostsRSAAuthentication and HostbasedAuthentication
    #IgnoreUserKnownHosts no

    # To disable tunneled clear text passwords, change to no here!
    #PasswordAuthentication yes
    #PermitEmptyPasswords no

    # Change to no to disable s/key passwords
    #ChallengeResponseAuthentication yes

    # Kerberos options
    #KerberosAuthentication no
    #KerberosOrLocalPasswd yes
    #KerberosTicketCleanup yes

    #AFSTokenPassing no

    # Kerberos TGT Passing only works with the AFS kaserver
    #KerberosTgtPassing no

    # Set this to 'yes' to enable PAM keyboard-interactive authentication
    # Warning: enabling this may bypass the setting of 'PasswordAuthentication'
    #PAMAuthenticationViaKbdInt no

    #X11Forwarding no
    X11Forwarding yes
    #X11DisplayOffset 10
    #X11UseLocalhost yes
    #PrintMotd yes
    #PrintLastLog yes
    #KeepAlive yes
    #UseLogin no
    #UsePrivilegeSeparation yes
    #PermitUserEnvironment no
    #Compression yes

    #MaxStartups 10
    # no default banner path
    #Banner /some/path
    #VerifyReverseMapping no
    #ShowPatchLevel no

    # override default of no subsystems
    Subsystem sftp /usr/libexec/openssh/sftp-server

    but port number is 22 yet! whats the problem?

  8. #8
    Join Date
    Jul 2003
    Location
    Goleta, CA
    Posts
    5,550
    Uncomment the line with with the port number. You have a lot of reading to do.
    Patron: I'd like my free lunch please.
    Cafe Manager: Free lunch? Did you read the fine print stating it was an April Fool's joke.
    Patron: I read the same way I listen, I ignore the parts I don't agree with. I'm suing you for false advertising.
    Cafe Owner: Is our lawyer still working pro bono?

  9. #9
    Join Date
    Aug 2004
    Location
    France
    Posts
    405
    You should not need to change the ssh port, anyway.
    None of our shared servers are using the default port and we never had any issue with using the WHM transfer tool. You only need to specify the port in the "Remote SSH port:" field.
    Marie - Co-Owner
    Need Further Assistance ? Here you go !
    English, french and spanish support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •