Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2013
    Posts
    260

    problem in connect to ssh from ssh

    Hello
    i want connect using ssh my server, to different server ssh

    i use this command:

    # ssh 206.xxx.xxx.xxx

    bu i see below error:
    [email protected] [~]# ssh 206.xxx.xxx.xxx
    ssh: connect to host 206.xxx.xxx.xxx port 22: Connection refused
    my port server is 1010, how i can use custome port in command?

    also i use below command:

    [email protected] [~]# ssh 206.xxx.xxx.xxx:1010

    bu i see below error:
    [email protected] [~]# ssh 206.xxx.xxx.xxx:1010
    ssh: Could not resolve hostname 206.xxx.xxx.xxx:1010: Name or service not known
    Please help me!

    Thanks.

  2. #2
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,960
    Moved > Hosting Security and Technology .
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  3. #3
    Join Date
    Jul 2010
    Location
    Manchester
    Posts
    125
    Just specify the port in the command using the -p argument.

    Code:
    ssh -p 1010 206.xxx.xxx.xxx
    Hope this helps,
    Dan
    zFast Technologies - Affordable Web Hosting
    █ Shared, Reseller, VPS, SHOUTcast & Domain Registration!
    █ Quality web hosting since 2009 - www.zfast.co.uk

  4. #4
    Join Date
    Sep 2013
    Location
    DAL, LEN, LA, NYC, SEA
    Posts
    111

    Re: problem in connect to ssh from ssh

    ssh -p 1010 206.xxx.xxx.xxx
    Owned-Networks
    VPS & Dedicated
    Lenoir, NC Dallas TX Los Angeles, CA Seattle, WA New York City, NY Miami, FL
    owned-networks.net English, Spanish & French Support

  5. #5
    Join Date
    Jan 2013
    Posts
    260
    Quote Originally Posted by zFastDan View Post
    Just specify the port in the command using the -p argument.

    Code:
    ssh -p 1010 206.xxx.xxx.xxx
    Hope this helps,
    Dan
    thanks
    i want get a file from ssh connected, like ftp
    in ftp i used mget, but i dont know what i must use in this.

    Please help me.

    i want get a folder from ssh connected to base server .

    Thanks.

  6. #6
    Join Date
    Sep 2013
    Location
    DAL, LEN, LA, NYC, SEA
    Posts
    111

  7. #7
    Join Date
    May 2013
    Location
    India
    Posts
    748
    You can use scp or rsync. Use the following command format to copy a directory from remote server to your local drive. Rsync is preferred over scp when we usually copy directories as it can resume the operation if any interrupt happened while the transfer.

    Via scp
    Code:
    scp -P 1010 -r [email protected]:<remote directory complete path> <local path>
    
    Eg: scp -P 1010 -r [email protected]:/root/dir/ /test
    Via rsync
    Code:
    rsync -avl -e "ssh -p 1010" [email protected]:<remote directory complete path> <local path>
    
    Eg: rsync -avl -e "ssh -p 1010" [email protected]:/root/dir /test
    Last edited by nixtree; 10-30-2013 at 08:26 AM.

  8. #8
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    You can use scp, but it is not exactly like ftp.
    If you need to scp a file between two servers, you need ssh access and login credentials for both servers.

    Edit: Seems Nixtree was faster than me.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  9. #9
    Join Date
    Jan 2013
    Posts
    260
    thank you very very much
    how i can add that on cronjob , becuase i want run that daily, it is possible i add in cronjob?

    Thanks!

  10. #10
    Join Date
    May 2013
    Location
    India
    Posts
    748
    Quote Originally Posted by morteza3245 View Post
    thank you very very much
    how i can add that on cronjob , becuase i want run that daily, it is possible i add in cronjob?

    Thanks!
    Yes, you can run the mentioned commands in a cron job as well. But it needs to have SSH public keys setup from source server to destination server, so that it can copy files without prompting password. For security sake, set public key for a normal user rather than root user, if the remote directory can be read and copied by a normal user on remote server.

Similar Threads

  1. Cant Connect SSH or anything !
    By y0us3f in forum Hosting Security and Technology
    Replies: 9
    Last Post: 06-14-2011, 02:57 AM
  2. Replies: 14
    Last Post: 01-18-2011, 05:09 AM
  3. Unable to connect via SSH
    By neggs in forum Dedicated Server
    Replies: 9
    Last Post: 01-07-2008, 06:33 PM
  4. Can't connect to SSH
    By mmm in forum Hosting Security and Technology
    Replies: 7
    Last Post: 10-06-2005, 05:59 PM
  5. connect to MySQL with SSH
    By lullaby in forum Hosting Security and Technology
    Replies: 5
    Last Post: 03-29-2003, 08:00 PM

Posting Permissions

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