Since this sounds suspiciously like homework, the education here will be a gradual process. First, try brute force. Here's an algorithm (well, Python really) that will do it:
for n1 in range(2,10):
for n2 in range(2,10):
if n2 != n1:
for n3 in range(2,10):
if n3 != n2 and n3 != n1:
for n4 in range(2,10):
if n4 != n3 and n4 != n2 and n4 != n1:
for n5 in range(2,10):
if n5 != n4 and n5 != n3 and n5 != n2 and n5 != n1:
for n6 in range(2,10):
if n6 != n5 and n6 != n4 and n6 != n3 and n6 != n2 and n6 != n1:
for n7 in range(2,10):
if n7 != n6 and n7 != n5 and n7 != n4 and n7 != n3 and n7 != n2 and n7 != n1:
print "%d%d%d%d%d%d%d"%(n1,n2,n3,n4,n5,n6,n7)
It's basically seven nested loops, one for each digit position, with checks that there's no duplicates at any point. Note that this is not a solution that will scale well for lots of digit positions, but it performs quite well for seven of them. If you want many more, a less brute-force solution would be better.